diff --git a/ext/libav/gstavauddec.c b/ext/libav/gstavauddec.c index 756f92d66d..f43bfad0e6 100644 --- a/ext/libav/gstavauddec.c +++ b/ext/libav/gstavauddec.c @@ -722,7 +722,10 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf) } } while (got_frame); - if (is_header || got_any_frames) { + /* Only override the flow return value if previously did have a GST_FLOW_OK. + * Failure to do this would result in skipping downstream issues caught in + * earlier steps. */ + if (ret == GST_FLOW_OK && (is_header || got_any_frames)) { ret = gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (ffmpegdec), NULL, 1); }