mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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.
This commit is contained in:
parent
fb852669de
commit
7101c4341a
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
|
||||
/* Wait for capture thread to stop */
|
||||
gst_pad_stop_task (decoder->srcpad);
|
||||
self->output_flow = GST_FLOW_OK;
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
|
||||
/* Should have been flushed already */
|
||||
g_assert (g_atomic_int_get (&self->active) == FALSE);
|
||||
g_assert (g_atomic_int_get (&self->processing) == FALSE);
|
||||
|
|
Loading…
Reference in a new issue