diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c index 73b7f9f5c0..00adb23020 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c @@ -322,11 +322,11 @@ gst_v4l2_codec_h264_dec_negotiate (GstVideoDecoder * decoder) GST_DEBUG_OBJECT (self, "Negotiate"); - gst_v4l2_codec_h264_dec_reset_allocation (self); - gst_v4l2_decoder_streamoff (self->decoder, GST_PAD_SINK); gst_v4l2_decoder_streamoff (self->decoder, GST_PAD_SRC); + gst_v4l2_codec_h264_dec_reset_allocation (self); + if (!gst_v4l2_decoder_set_sink_fmt (self->decoder, V4L2_PIX_FMT_H264_SLICE, self->coded_width, self->coded_height, get_pixel_bitdepth (self))) { GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecmpeg2dec.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecmpeg2dec.c index 3e0e802022..0d26b28e7f 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecmpeg2dec.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecmpeg2dec.c @@ -241,11 +241,11 @@ gst_v4l2_codec_mpeg2_dec_negotiate (GstVideoDecoder * decoder) GST_DEBUG_OBJECT (self, "Negotiate"); - gst_v4l2_codec_mpeg2_dec_reset_allocation (self); - gst_v4l2_decoder_streamoff (self->decoder, GST_PAD_SINK); gst_v4l2_decoder_streamoff (self->decoder, GST_PAD_SRC); + gst_v4l2_codec_mpeg2_dec_reset_allocation (self); + if (!gst_v4l2_decoder_set_sink_fmt (self->decoder, V4L2_PIX_FMT_MPEG2_SLICE, self->width, self->height, get_pixel_bitdepth (self))) { GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp8dec.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp8dec.c index 02b8eacfe6..8a0634a59a 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp8dec.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp8dec.c @@ -191,11 +191,11 @@ gst_v4l2_codec_vp8_dec_negotiate (GstVideoDecoder * decoder) GST_DEBUG_OBJECT (self, "Negotiate"); - gst_v4l2_codec_vp8_dec_reset_allocation (self); - gst_v4l2_decoder_streamoff (self->decoder, GST_PAD_SINK); gst_v4l2_decoder_streamoff (self->decoder, GST_PAD_SRC); + gst_v4l2_codec_vp8_dec_reset_allocation (self); + if (!gst_v4l2_decoder_set_sink_fmt (self->decoder, V4L2_PIX_FMT_VP8_FRAME, self->width, self->height, 12 /* 8 bits 4:2:0 */ )) { GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c index 0f65de1f6f..ee10a24fec 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c @@ -429,11 +429,11 @@ gst_v4l2_codec_vp9_dec_negotiate (GstVideoDecoder * decoder) GST_DEBUG_OBJECT (self, "Negotiate"); - gst_v4l2_codec_vp9_dec_reset_allocation (self); - gst_v4l2_decoder_streamoff (self->decoder, GST_PAD_SINK); gst_v4l2_decoder_streamoff (self->decoder, GST_PAD_SRC); + gst_v4l2_codec_vp9_dec_reset_allocation (self); + if (!gst_v4l2_decoder_set_sink_fmt (self->decoder, V4L2_PIX_FMT_VP9_FRAME, self->width, self->height, self->bit_depth)) { GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, @@ -562,11 +562,6 @@ gst_v4l2_codec_vp9_dec_new_sequence (GstVp9Decoder * decoder, /* TODO Check if current buffers are large enough, and reuse them */ if (self->width != frame_hdr->width || self->height != frame_hdr->height) { - if (self->width > 0 || self->height > 0) { - GST_ERROR_OBJECT (self, - "Dynamic resolution changes are not yet supported in v4l2"); - return GST_FLOW_ERROR; - } self->width = frame_hdr->width; self->height = frame_hdr->height; negotiation_needed = TRUE;