Commit ef633e28 authored by Nicolas Dufresne's avatar Nicolas Dufresne

v4l2encoder: Fix negotiation error handling

The subclass negotiated function will call set_format, if that fails the
pool will not be created. We ended up with an assertion.

GStreamer-CRITICAL **: gst_buffer_pool_set_active: assertion 'GST_IS_BUFFER_POOL (pool)' failed
parent b3e089d4
......@@ -377,17 +377,17 @@ static gboolean
gst_v4l2_video_enc_negotiate (GstVideoEncoder * encoder)
GstV4l2VideoEnc *self = GST_V4L2_VIDEO_ENC (encoder);
gboolean ret;
ret = GST_VIDEO_ENCODER_CLASS (parent_class)->negotiate (encoder);
if (!GST_VIDEO_ENCODER_CLASS (parent_class)->negotiate (encoder))
return FALSE;
if (!gst_buffer_pool_set_active (GST_BUFFER_POOL (self->v4l2capture->pool),
TRUE)) {
GST_WARNING_OBJECT (self, "Could not activate capture buffer pool.");
ret = FALSE;
return FALSE;
return ret;
return TRUE;
static GstVideoCodecFrame *
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment