Commit 7101c434 authored by Nicolas Dufresne's avatar Nicolas Dufresne
Browse files

v4l2videodec: handle stop being called without flush

Uppon certain downstream error, stop() is called without a flush(). This mean that
the streaming thread may still be running even though unlock has been called.
Now calling flush to reset the decoder state if we are processing.
parent fb852669
......@@ -210,6 +210,15 @@ gst_v4l2_video_dec_stop (GstVideoDecoder * decoder)
GST_DEBUG_OBJECT (self, "Stopping");
gst_v4l2_object_unlock (self->v4l2output);
gst_v4l2_object_unlock (self->v4l2capture);
/* Wait for capture thread to stop */
gst_pad_stop_task (decoder->srcpad);
self->output_flow = GST_FLOW_OK;
/* Should have been flushed already */
g_assert (g_atomic_int_get (&self->active) == FALSE);
g_assert (g_atomic_int_get (&self->processing) == FALSE);
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