From: miaohong chen Date: Fri, 18 Sep 2020 02:37:26 +0000 (+0800) Subject: h265: add init stream offset [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=33b1a4774c7b1aa44e261824b4c0ecb751cd0e43;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git h265: add init stream offset [1/1] PD#SWPL-33557 Problem: The stream offset is not initialized each time the start broadcast, which causes it to accumulate, so that the correct pts cannot be obtained, which may cause out of synchronization. Solution: init stream offset when start every time. Verify: u212 Change-Id: Iba8df5525cfcf6b8b42ef4fc4c464ae681202272 Signed-off-by: miaohong chen --- diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index f58f0c3..4e4e984 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -11966,6 +11966,9 @@ static s32 vh265_init(struct hevc_state_s *hevc) set_vdec_func(&vh265_dec_status); #endif amhevc_start(); + + WRITE_VREG(HEVC_SHIFT_BYTE_COUNT, 0); + hevc->stat |= STAT_VDEC_RUN; hevc->init_flag = 1; error_handle_threshold = 30;