diff mbox series

[FFmpeg-devel,3/4] avcodec/mpeg4videodec: Use smallest max_depth in get_vlc2()

Message ID 20201023205454.851696-3-andreas.rheinhardt@gmail.com
State Accepted
Commit 6965ade54c867ec2e55b382d7fa60a1fecf1fe84
Headers show
Series [FFmpeg-devel,1/4] avcodec/atrac3plus: Perform reusing of VLCs during init
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 23, 2020, 8:54 p.m. UTC
The longest code here is 12 bits long and can be read in two attempts.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/mpeg4videodec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer Oct. 24, 2020, 12:38 p.m. UTC | #1
On Fri, Oct 23, 2020 at 10:54:53PM +0200, Andreas Rheinhardt wrote:
> The longest code here is 12 bits long and can be read in two attempts.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/mpeg4videodec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

probably ok

thx

[...]
diff mbox series

Patch

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