]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/h261dec: Don't use too big max_depth in get_vlc2()
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 9 Dec 2020 02:04:59 +0000 (03:04 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 31 Dec 2020 10:56:18 +0000 (11:56 +0100)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/h261dec.c

index 8a49e7d894769e23ba6c577f3cd5dd70a302bdca..4373a60df484ce99fafdcdf5d69ba6db505c0acb 100644 (file)
@@ -431,7 +431,7 @@ static int h261_decode_mb(H261Context *h)
 
     // Read cbp
     if (HAS_CBP(h->mtype))
-        cbp = get_vlc2(&s->gb, h261_cbp_vlc.table, H261_CBP_VLC_BITS, 2) + 1;
+        cbp = get_vlc2(&s->gb, h261_cbp_vlc.table, H261_CBP_VLC_BITS, 1) + 1;
 
     if (s->mb_intra) {
         s->current_picture.mb_type[xy] = MB_TYPE_INTRA;