v4l2videodec: don't stop if loop returned FLUSHING

The decodeing thread returning flushing isn't an error, we should simply
try starting the task again. If it's actually flushing, it will stop again by itself.
This commit is contained in:
Nicolas Dufresne 2014-05-23 18:25:49 -04:00 committed by Nicolas Dufresne
parent 3acbd9cb99
commit 57726911f8

View file

@ -518,8 +518,9 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
}
if (g_atomic_int_get (&self->processing) == FALSE) {
/* It possible that the processing thread stopped due to an error */
if (self->output_flow != GST_FLOW_OK) {
/* It's possible that the processing thread stopped due to an error */
if (self->output_flow != GST_FLOW_OK &&
self->output_flow != GST_FLOW_FLUSHING) {
GST_DEBUG_OBJECT (self, "Processing loop stopped with error, leaving");
ret = self->output_flow;
goto drop;