diff options
author | Max Kellermann <max@duempel.org> | 2014-07-12 01:51:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-07-12 01:51:39 +0200 |
commit | e42b152037d5d7697bb6775d9fb72c8b051d0d9c (patch) | |
tree | b8a9a0dd18c30efc22246d68efc1be54cd568e13 | |
parent | da599e3f1af9ff12c2cf468a2ea40c5bc2d784fb (diff) | |
download | mpd-e42b152037d5d7697bb6775d9fb72c8b051d0d9c.tar.gz mpd-e42b152037d5d7697bb6775d9fb72c8b051d0d9c.tar.xz mpd-e42b152037d5d7697bb6775d9fb72c8b051d0d9c.zip |
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().
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/FaadDecoderPlugin.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/decoder/plugins/FaadDecoderPlugin.cxx b/src/decoder/plugins/FaadDecoderPlugin.cxx index 1fdc7def0..47dbc7c66 100644 --- a/src/decoder/plugins/FaadDecoderPlugin.cxx +++ b/src/decoder/plugins/FaadDecoderPlugin.cxx @@ -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 */ |