mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
v4l2videodec: Check stop in flush() to avoid race condition.
Backward playback will drain and flush every frame. Stop playback when backward playback have race condition between exit thread and streaming thread flush. Add one check to avoid it. Fixes #639
This commit is contained in:
parent
1b752c0fa8
commit
9d42b2dd5d
1 changed files with 3 additions and 0 deletions
|
@ -310,6 +310,9 @@ gst_v4l2_video_dec_flush (GstVideoDecoder * decoder)
|
|||
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (!g_atomic_int_get (&self->active)))
|
||||
return TRUE;
|
||||
|
||||
self->output_flow = GST_FLOW_OK;
|
||||
|
||||
gst_v4l2_object_unlock_stop (self->v4l2output);
|
||||
|
|
Loading…
Reference in a new issue