Commit e42b1520 authored by Max Kellermann's avatar Max Kellermann

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().
parent da599e3f
...@@ -365,11 +365,8 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is, ...@@ -365,11 +365,8 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is,
{ {
const float total_time = faad_song_duration(buffer, is); const float total_time = faad_song_duration(buffer, is);
while (!decoder_buffer_is_full(buffer) && !is.LockIsEOF() && if (adts_find_frame(buffer) == 0)
decoder_get_command(mpd_decoder) == DecoderCommand::NONE) { return;
adts_find_frame(buffer);
decoder_buffer_fill(buffer);
}
/* initialize it */ /* initialize it */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment