Commit e9eba56c authored by Nicolas Dufresne's avatar Nicolas Dufresne

v4l2videodec: Ensure internal pool are activated

parent a8024fef
......@@ -449,6 +449,7 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
}
if (G_UNLIKELY (!GST_V4L2_IS_ACTIVE (self->v4l2capture))) {
GstBufferPool *pool = GST_BUFFER_POOL (self->v4l2output->pool);
GstVideoInfo info;
GstVideoCodecState *output_state;
GstBuffer *codec_data;
......@@ -468,6 +469,9 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
frame->input_buffer = NULL;
}
if (!gst_buffer_pool_set_active (pool, TRUE))
goto activate_failed;
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
gst_v4l2_object_unlock_stop (self->v4l2output);
ret =
......@@ -494,6 +498,11 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
else
goto not_negotiated;
}
/* Ensure our internal pool is activated */
if (!gst_buffer_pool_set_active (GST_BUFFER_POOL (self->v4l2capture->pool),
TRUE))
goto activate_failed;
}
if (g_atomic_int_get (&self->processing) == FALSE) {
......@@ -542,6 +551,13 @@ not_negotiated:
ret = GST_FLOW_NOT_NEGOTIATED;
goto drop;
}
activate_failed:
{
GST_ELEMENT_ERROR (self, RESOURCE, SETTINGS,
(_("Failed to allocated required memory.")),
("Buffer pool activation failed"));
return GST_FLOW_ERROR;
}
flushing:
{
ret = GST_FLOW_FLUSHING;
......
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