Merge "ppmgr: fix omx freeze when reset [1/1]" into odroidg12-4.9.y-android

This commit is contained in:
Chris
2020-06-11 17:44:43 +09:00
committed by Gerrit Code Review
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) {