decoder/faad: bail out early if sample rate is invalid

This commit is contained in:
Max Kellermann 2014-07-12 00:21:52 +02:00
parent 835b0c44cd
commit 06aa689383
1 changed files with 2 additions and 0 deletions

View File

@ -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);