mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
amvideo: fix video block when pts discontinue [1/1]
PD#SWPL-5038 Problem: image will block when pts discontinue Solution: do not show the frame when pts greater than pcr Verify: tested on Marconi Change-Id: I57ea973b7fdcdc7cded2c5c9b681be29f0a31a4b Signed-off-by: peter wang <peter.wang@amlogic.com>
This commit is contained in:
@@ -108,6 +108,8 @@ static int video_global_output = 1;
|
||||
/* video_pause_global: 0 is play, 1 is pause, 2 is invalid */
|
||||
static int video_pause_global = 1;
|
||||
|
||||
static u32 cur_omx_index;
|
||||
|
||||
#ifdef CONFIG_GE2D_KEEP_FRAME
|
||||
/* #if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON6 */
|
||||
/* #include <mach/mod_gate.h> */
|
||||
@@ -5377,11 +5379,13 @@ static inline bool vpts_expire(struct vframe_s *cur_vf,
|
||||
/* pts==0 is a keep frame maybe. */
|
||||
if (systime > next_vf->pts || next_vf->pts == 0)
|
||||
return true;
|
||||
if (omx_secret_mode == true)
|
||||
if (omx_secret_mode == true
|
||||
&& cur_omx_index >= next_vf->omx_index)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
} else if (omx_secret_mode == true)
|
||||
} else if (omx_secret_mode == true
|
||||
&& cur_omx_index >= next_vf->omx_index)
|
||||
return true;
|
||||
} else if (omx_run
|
||||
&& omx_secret_mode
|
||||
@@ -8853,6 +8857,7 @@ static void set_omx_pts(u32 *p)
|
||||
u32 session = p[5];
|
||||
unsigned int try_cnt = 0x1000;
|
||||
|
||||
cur_omx_index = frame_num;
|
||||
mutex_lock(&omx_mutex);
|
||||
if (omx_pts_set_index < frame_num)
|
||||
omx_pts_set_index = frame_num;
|
||||
|
||||
Reference in New Issue
Block a user