summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-23 20:00:27 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-24 16:50:59 +0200
commit6965ade54c867ec2e55b382d7fa60a1fecf1fe84 (patch)
tree6f077556501d1df11ff79af06ab0e5e1f19eb3e6 /libavcodec
parent51eda4c394f1b0c1b8aee67b90e10150ddae2f7c (diff)
avcodec/mpeg4videodec: Use smallest max_depth in get_vlc2()
The longest code here is 12 bits long and can be read in two attempts. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg4videodec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 95a0e63a29..c26ad616b8 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -203,14 +203,14 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g
int length;
int x = 0, y = 0;
- length = get_vlc2(gb, sprite_trajectory.table, SPRITE_TRAJ_VLC_BITS, 3);
+ length = get_vlc2(gb, sprite_trajectory.table, SPRITE_TRAJ_VLC_BITS, 2);
if (length > 0)
x = get_xbits(gb, length);
if (!(ctx->divx_version == 500 && ctx->divx_build == 413))
check_marker(s->avctx, gb, "before sprite_trajectory");
- length = get_vlc2(gb, sprite_trajectory.table, SPRITE_TRAJ_VLC_BITS, 3);
+ length = get_vlc2(gb, sprite_trajectory.table, SPRITE_TRAJ_VLC_BITS, 2);
if (length > 0)
y = get_xbits(gb, length);