From 97e68b36c743c67dc90fe44dc7ad5238f3d6e9c1 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 21 Jun 2013 20:41:15 +0200 Subject: [PATCH] audiodecoder: Don't return not-negotiated if flushing If the pad is flushing after a failed negotiation, return GST_FLOW_FLUSHING. https://bugzilla.gnome.org/show_bug.cgi?id=701763 --- gst-libs/gst/audio/gstaudiodecoder.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index f8fb8b7ff2..c3e4af8c72 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -1033,7 +1033,10 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf, (GST_AUDIO_INFO_IS_VALID (&ctx->info) && gst_pad_check_reconfigure (dec->srcpad)))) { if (!gst_audio_decoder_negotiate (dec)) { - ret = GST_FLOW_NOT_NEGOTIATED; + if (GST_PAD_IS_FLUSHING (dec->srcpad)) + ret = GST_FLOW_FLUSHING; + else + ret = GST_FLOW_NOT_NEGOTIATED; goto exit; } }