decoder/faad: eliminate the adts_find_frame() loop

This loop is completely unnecessary.  We just need to find the first
ADTS frame and feed it into NeAACDecInit().
This commit is contained in:
Max Kellermann 2014-07-12 01:51:39 +02:00
parent da599e3f1a
commit e42b152037

View File

@ -365,11 +365,8 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is,
{
const float total_time = faad_song_duration(buffer, is);
while (!decoder_buffer_is_full(buffer) && !is.LockIsEOF() &&
decoder_get_command(mpd_decoder) == DecoderCommand::NONE) {
adts_find_frame(buffer);
decoder_buffer_fill(buffer);
}
if (adts_find_frame(buffer) == 0)
return;
/* initialize it */