From: Nicolas Dufresne Date: Wed, 1 Dec 2021 17:16:40 +0000 (-0500) Subject: v4l2codecs: vp9: Drop frames on non-keyframe format change X-Git-Tag: 1.20.0~214 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05458f05e0abfc3760dc8271b18d71a321eb84ab;p=platform%2Fupstream%2Fgstreamer.git v4l2codecs: vp9: Drop frames on non-keyframe format change V4L2 does not yet support this feature, this will skip over the transition portion up to the next keyframe. Part-of: --- diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c index ee10a24..02b48d6 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c @@ -353,6 +353,7 @@ gst_v4l2_codec_vp9_dec_fill_dec_params (GstV4l2CodecVp9Dec * self, static gboolean gst_v4l2_codec_vp9_dec_open (GstVideoDecoder * decoder) { + GstVp9Decoder *vp9dec = GST_VP9_DECODER (decoder); GstV4l2CodecVp9Dec *self = GST_V4L2_CODEC_VP9_DEC (decoder); if (!gst_v4l2_decoder_open (self->decoder)) { @@ -362,6 +363,10 @@ gst_v4l2_codec_vp9_dec_open (GstVideoDecoder * decoder) return FALSE; } + /* V4L2 does not support non-keyframe resolution change, this will ask the + * base class to drop frame until the next keyframe as a workaround. */ + gst_vp9_decoder_set_non_keyframe_format_change_support (vp9dec, FALSE); + return TRUE; }