From 05458f05e0abfc3760dc8271b18d71a321eb84ab Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 1 Dec 2021 12:16:40 -0500 Subject: [PATCH] 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: --- subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.7.4