flacdec: Return error when blocksize code of 0 is found. It is a
reserved value per the FLAC format documentation. Originally committed as revision 17747 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
c978997a88
commit
dde318d5d9
@ -527,9 +527,10 @@ static int decode_frame(FLACContext *s, int alloc_data_size)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blocksize_code == 0)
|
if (blocksize_code == 0) {
|
||||||
blocksize = s->min_blocksize;
|
av_log(s->avctx, AV_LOG_ERROR, "reserved blocksize code: 0\n");
|
||||||
else if (blocksize_code == 6)
|
return -1;
|
||||||
|
} else if (blocksize_code == 6)
|
||||||
blocksize = get_bits(&s->gb, 8)+1;
|
blocksize = get_bits(&s->gb, 8)+1;
|
||||||
else if (blocksize_code == 7)
|
else if (blocksize_code == 7)
|
||||||
blocksize = get_bits(&s->gb, 16)+1;
|
blocksize = get_bits(&s->gb, 16)+1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user