fdkaacdec: do not error out of out of sync return

The docs say we should continue feeding in data and decoding

https://bugzilla.gnome.org/show_bug.cgi?id=772067
This commit is contained in:
Vincent Penquerc'h 2016-09-27 16:15:44 +01:00
parent a828b12ca8
commit fed624a208

View file

@ -210,6 +210,11 @@ gst_fdkaacdec_handle_frame (GstAudioDecoder * dec, GstBuffer * inbuf)
if ((err =
aacDecoder_DecodeFrame (self->dec, (gint16 *) self->decode_buffer,
self->decode_buffer_size, flags)) != AAC_DEC_OK) {
if (err == AAC_DEC_TRANSPORT_SYNC_ERROR) {
ret = GST_FLOW_OK;
outbuf = NULL;
goto finish;
}
GST_AUDIO_DECODER_ERROR (self, 1, STREAM, DECODE, (NULL),
("decoding error: %d", err), ret);
goto out;
@ -383,6 +388,7 @@ gst_fdkaacdec_handle_frame (GstAudioDecoder * dec, GstBuffer * inbuf)
GST_AUDIO_INFO_CHANNELS (&info), pos, gst_pos);
}
finish:
ret = gst_audio_decoder_finish_frame (dec, outbuf, 1);
out: