v4l2videodec: Handle start_streaming error

https://bugzilla.gnome.org/show_bug.cgi?id=730207
This commit is contained in:
Nicolas Dufresne 2014-05-15 10:44:29 -04:00
parent bff156bc57
commit 541a9670d2

View file

@ -528,8 +528,10 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
GST_DEBUG_OBJECT (self, "Starting decoding thread");
/* Enable processing input */
gst_v4l2_buffer_pool_start_streaming (GST_V4L2_BUFFER_POOL
(self->v4l2capture->pool));
if (!gst_v4l2_buffer_pool_start_streaming (GST_V4L2_BUFFER_POOL
(self->v4l2capture->pool)))
goto start_streaming_failed;
gst_v4l2_object_unlock_stop (self->v4l2output);
gst_v4l2_object_unlock_stop (self->v4l2capture);
@ -566,6 +568,13 @@ not_negotiated:
ret = GST_FLOW_NOT_NEGOTIATED;
goto drop;
}
start_streaming_failed:
{
GST_ELEMENT_ERROR (self, RESOURCE, SETTINGS,
(_("Failed to re-enabled decoder.")),
("Could not re-enqueue and start streaming on decide."));
return GST_FLOW_ERROR;
}
activate_failed:
{
GST_ELEMENT_ERROR (self, RESOURCE, SETTINGS,