mfxSession session;
mfxStatus status;
GstMapInfo map_info;
- guint i;
+ guint i, retry_err_incompatible = 0;
gsize data_size;
gboolean hard_reset = FALSE;
/* media-sdk requires complete reset since the surface is inadaquate to
* do further decoding */
- if (status == MFX_ERR_INCOMPATIBLE_VIDEO_PARAM) {
+ if (status == MFX_ERR_INCOMPATIBLE_VIDEO_PARAM &&
+ retry_err_incompatible++ < 1) {
/* MFX_ERR_INCOMPATIBLE_VIDEO_PARAM means the current mfx surface is not
* suitable for the current frame, call MFXVideoDECODE_DecodeHeader to get
* the current frame size then do memory re-allocation, otherwise
continue;
}
+ retry_err_incompatible = 0;
+
if (G_LIKELY (status == MFX_ERR_NONE)
|| (status == MFX_WRN_VIDEO_PARAM_CHANGED)) {
thiz->next_task = (thiz->next_task + 1) % thiz->tasks->len;