Commit e82995fc authored by jbr's avatar jbr

flacdec: Warn about invalid max blocksize and limit the minimum value.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17751 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 57c61caf
...@@ -187,6 +187,11 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, ...@@ -187,6 +187,11 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
skip_bits(&gb, 16); /* skip min blocksize */ skip_bits(&gb, 16); /* skip min blocksize */
s->max_blocksize = get_bits(&gb, 16); s->max_blocksize = get_bits(&gb, 16);
if (s->max_blocksize < 16) {
av_log(avctx, AV_LOG_WARNING, "invalid max blocksize: %d\n",
s->max_blocksize);
s->max_blocksize = 16;
}
skip_bits(&gb, 24); /* skip min frame size */ skip_bits(&gb, 24); /* skip min frame size */
s->max_framesize = get_bits_long(&gb, 24); s->max_framesize = get_bits_long(&gb, 24);
......
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