mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-04 22:48:54 +00:00
flacdec: if we aborted reading, don't do into an infinite loop.
If our read callback ran out of data, so had to abort reading, we return GST_FLOW_ERROR instead of going into an infinite loop.
This commit is contained in:
parent
b9ca852b51
commit
db0b8755e0
1 changed files with 7 additions and 0 deletions
|
@ -1530,6 +1530,13 @@ gst_flac_dec_chain (GstPad * pad, GstBuffer * buf)
|
|||
GST_DEBUG_OBJECT (dec, "process_single failed");
|
||||
break;
|
||||
}
|
||||
|
||||
if (FLAC__stream_decoder_get_state (dec->stream_decoder) ==
|
||||
FLAC__STREAM_DECODER_ABORTED) {
|
||||
GST_WARNING_OBJECT (dec, "Read callback caused internal abort");
|
||||
dec->last_flow = GST_FLOW_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (dec->framed && got_audio_frame) {
|
||||
/* framed - there should always be enough data to decode something */
|
||||
|
|
Loading…
Reference in a new issue