aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-07-12 00:21:52 +0200
committerMax Kellermann <max@duempel.org>2014-07-12 00:23:11 +0200
commit06aa68938357f4a567e1f89b51a593f11fea8fee (patch)
treec185dd9cad01cb2a5f5371359975b322bc707669 /src
parent835b0c44cdcc98c6b4eda2d1795797f364b2dc56 (diff)
downloadmpd-06aa68938357f4a567e1f89b51a593f11fea8fee.tar.gz
mpd-06aa68938357f4a567e1f89b51a593f11fea8fee.tar.xz
mpd-06aa68938357f4a567e1f89b51a593f11fea8fee.zip
decoder/faad: bail out early if sample rate is invalid
Diffstat (limited to 'src')
-rw-r--r--src/decoder/FaadDecoderPlugin.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/decoder/FaadDecoderPlugin.cxx b/src/decoder/FaadDecoderPlugin.cxx
index bc3533228..07c10fa69 100644
--- a/src/decoder/FaadDecoderPlugin.cxx
+++ b/src/decoder/FaadDecoderPlugin.cxx
@@ -140,6 +140,8 @@ adts_song_duration(DecoderBuffer *buffer)
assert(frame_length <= buffer_length);
sample_rate = adts_sample_rates[(data[2] & 0x3c) >> 2];
+ if (sample_rate == 0)
+ break;
}
decoder_buffer_consume(buffer, frame_length);