diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-01 02:17:43 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-24 11:35:03 +0100 |
commit | 73b3ea572819a79e7896627e4c1daf74ce1dfe46 (patch) | |
tree | 5ecd4250b518de1c2c60701f5deddafe051f2933 /libavcodec/g2meet.c | |
parent | e74621b0a8c4d8f9aecdbb72ca264bdaca17ab52 (diff) | |
download | ffmpeg-73b3ea572819a79e7896627e4c1daf74ce1dfe46.tar.gz |
avcodec/g2meet: Use least max_depth in get_vlc2()
The longest AC codes of the standard JPEG tables are 16 bits long; for
the DC tables, the maximum is 11, so using max_depth of two is
sufficient.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/g2meet.c')
-rw-r--r-- | libavcodec/g2meet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 6b870ae3d4..f6aa636bde 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -248,7 +248,7 @@ static int jpg_decode_block(JPGContext *c, GetBitContext *gb, return AVERROR_INVALIDDATA; c->bdsp.clear_block(block); - dc = get_vlc2(gb, c->dc_vlc[is_chroma].table, 9, 3); + dc = get_vlc2(gb, c->dc_vlc[is_chroma].table, 9, 2); if (dc < 0) return AVERROR_INVALIDDATA; if (dc) @@ -259,7 +259,7 @@ static int jpg_decode_block(JPGContext *c, GetBitContext *gb, pos = 0; while (pos < 63) { - val = get_vlc2(gb, c->ac_vlc[is_chroma].table, 9, 3); + val = get_vlc2(gb, c->ac_vlc[is_chroma].table, 9, 2); if (val < 0) return AVERROR_INVALIDDATA; pos += val >> 4; |