ffmpeg decoder: return last chunk of audio

Change-Id: I712e5959f066e65471777e6724637aac7a17d07c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3510
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Máximo Castañeda
2020-12-21 14:29:43 +00:00
committed by Adrien Destugues
parent 42b9734805
commit 7f7f9f1def
@@ -729,6 +729,9 @@ AVCodecDecoder::_DecodeNextAudioFrame()
}
status_t decodeAudioChunkStatus = _DecodeNextAudioFrameChunk();
if (decodeAudioChunkStatus == B_LAST_BUFFER_ERROR
&& fRawDecodedAudio->nb_samples > 0)
break;
if (decodeAudioChunkStatus != B_OK)
return decodeAudioChunkStatus;
}