From 06aa68938357f4a567e1f89b51a593f11fea8fee Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Jul 2014 00:21:52 +0200 Subject: decoder/faad: bail out early if sample rate is invalid --- src/decoder/FaadDecoderPlugin.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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); -- cgit v1.2.3