mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
avauddec: Avoid dropping non-OK flow return
When sucessfully finishing out frames (or finishing configuration), we must make sure we don't override any failing GstFlowReturn that might have been detected previously. Failure to do this would result in not propagating not-linked, flushing, etc... Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/90>
This commit is contained in:
parent
c77e13b9b3
commit
c6e51f404d
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue