mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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
This commit is contained in:
parent
b3e089d415
commit
ef633e28f8
1 changed files with 4 additions and 4 deletions
|
@ -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 *
|
||||
|
|
Loading…
Reference in a new issue