From: Julien Isorce Date: Thu, 26 Dec 2019 19:24:37 +0000 (-0800) Subject: msdkdec: trigger renegotiation if video info changes X-Git-Tag: 1.19.3~507^2~2474 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e6a1b9634954f2382c29d93ec0ce1cddc7da620;p=platform%2Fupstream%2Fgstreamer.git msdkdec: trigger renegotiation if video info changes Useful when framerate changes. Previously it was only checking for resolution change but renego should happen if any video info changes. --- diff --git a/sys/msdk/gstmsdkdec.c b/sys/msdk/gstmsdkdec.c index cb4e15e..4517032 100644 --- a/sys/msdk/gstmsdkdec.c +++ b/sys/msdk/gstmsdkdec.c @@ -768,12 +768,12 @@ gst_msdkdec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state) GstMsdkDec *thiz = GST_MSDKDEC (decoder); if (thiz->input_state) { - /* mark for re-negotiation if display resolution changes */ - if ((GST_VIDEO_INFO_WIDTH (&thiz->input_state->info) != - GST_VIDEO_INFO_WIDTH (&state->info)) || - GST_VIDEO_INFO_HEIGHT (&thiz->input_state->info) != - GST_VIDEO_INFO_HEIGHT (&state->info)) + /* mark for re-negotiation if display resolution or any other video info + * changes like framerate. */ + if (!gst_video_info_is_equal (&thiz->input_state->info, &state->info)) { + GST_INFO_OBJECT (thiz, "Schedule renegotiation as video info changed"); thiz->do_renego = TRUE; + } gst_video_codec_state_unref (thiz->input_state); } thiz->input_state = gst_video_codec_state_ref (state);