h265: add init stream offset [1/1]
authormiaohong chen <miaohong.chen@amlogic.com>
Fri, 18 Sep 2020 02:37:26 +0000 (10:37 +0800)
committerMiaohong Chen <miaohong.chen@amlogic.com>
Fri, 25 Sep 2020 08:21:15 +0000 (01:21 -0700)
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 <miaohong.chen@amlogic.com>
drivers/frame_provider/decoder/h265/vh265.c

index f58f0c3dada426eff4184903a9cdb07f94cab818..4e4e9848015898797676c198316489c1f85880dc 100644 (file)
@@ -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;