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:
Kevin Song 2019-10-11 12:27:12 +00:00 committed by Nicolas Dufresne
parent 1b752c0fa8
commit 9d42b2dd5d

View file

@ -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);