Flushing the decoder invalidates all buffers, so it should be done
after quiting the decoding loop. Otherwise we can jump into
"failed_release" and stop everything
https://bugzilla.gnome.org/show_bug.cgi?id=711156
}
self->flushing = TRUE;
- gst_amc_codec_flush (self->codec);
-
/* Wait until the srcpad loop is finished,
* unlock GST_AUDIO_DECODER_STREAM_LOCK to prevent deadlocks
* caused by using this lock from inside the loop function */
GST_PAD_STREAM_LOCK (GST_AUDIO_DECODER_SRC_PAD (self));
GST_PAD_STREAM_UNLOCK (GST_AUDIO_DECODER_SRC_PAD (self));
GST_AUDIO_DECODER_STREAM_LOCK (self);
+ gst_amc_codec_flush (self->codec);
self->flushing = FALSE;
/* Start the srcpad loop again */
}
self->flushing = TRUE;
- gst_amc_codec_flush (self->codec);
-
/* Wait until the srcpad loop is finished,
* unlock GST_VIDEO_DECODER_STREAM_LOCK to prevent deadlocks
* caused by using this lock from inside the loop function */
GST_PAD_STREAM_LOCK (GST_VIDEO_DECODER_SRC_PAD (self));
GST_PAD_STREAM_UNLOCK (GST_VIDEO_DECODER_SRC_PAD (self));
GST_VIDEO_DECODER_STREAM_LOCK (self);
+ gst_amc_codec_flush (self->codec);
self->flushing = FALSE;
/* Start the srcpad loop again */