ppmgr: fix omx freeze when reset [1/1]

PD#SWPL-20851

Problem:
omx can not set omx pts after reset

Solution:
set omx pts after reset

Verify:
U212

Change-Id: I582e5696f14b50bb774e18ef8295af5b4f121501
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
This commit is contained in:
jintao xu
2020-03-10 15:45:13 +08:00
committed by Chris KIM
parent c6ef9b6d95
commit 11de5ce674
3 changed files with 5 additions and 2 deletions

View File

@@ -2938,7 +2938,8 @@ SKIP_DETECT:
/***recycle buffer to decoder***/
PPMGRVPP_WARN("ppmgr rebuild light-unregister_1\n");
vf_unreg_provider(&ppmgr_vf_prov);
msleep(30);
omx_cur_session = 0xffffffff;
usleep_range(4000, 5000);
vf_reg_provider(&ppmgr_vf_prov);
vf_local_init();
ppmgr_blocking = false;

View File

@@ -72,6 +72,7 @@ enum ppmgr_source_type {
VDIN_10BIT_NORMAL,
};
extern u32 omx_cur_session;
#endif

View File

@@ -126,7 +126,7 @@ static int omx_pts_dv_lower = OMX_PTS_DV_DEFAULT_LOWER;
static int omx_pts_set_from_hwc_count;
static int omx_pts_set_from_hwc_count_begin;
static bool omx_check_previous_session;
static u32 omx_cur_session = 0xffffffff;
u32 omx_cur_session = 0xffffffff;
static int drop_frame_count;
#define OMX_MAX_COUNT_RESET_SYSTEMTIME 2
#define OMX_MAX_COUNT_RESET_SYSTEMTIME_BEGIN 10
@@ -4808,6 +4808,7 @@ static int video_receiver_event_fun(int type, void *data, void *private_data)
mutex_unlock(&omx_mutex);
} else if (type == VFRAME_EVENT_PROVIDER_RESET) {
video_vf_light_unreg_provider(1);
omx_cur_session = 0xffffffff;
} else if (type == VFRAME_EVENT_PROVIDER_LIGHT_UNREG)
video_vf_light_unreg_provider(0);
else if (type == VFRAME_EVENT_PROVIDER_REG) {