]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/h261dec: Don't initialize unused part of RLTable
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 9 Dec 2020 11:54:12 +0000 (12:54 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 25 Jan 2021 13:52:05 +0000 (14:52 +0100)
The H.261 decoder only uses an RLTable's VLC table, yet it also
initializes its index_run, max_level and max_run. This commit stops
doing so; it will also simplify making this decoder init-threadsafe,
as the H.261 decoder and encoder now initialize disjoint parts of their
common RLTable.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/h261dec.c

index 2dc2fb30f25fcc89df6da53f95acf3f6e34d7faf..6b680a862da0cff72233deadda0845e929b23425 100644 (file)
@@ -81,7 +81,6 @@ static av_cold int h261_decode_init(AVCodecContext *avctx)
     s->low_delay   = 1;
     avctx->pix_fmt = AV_PIX_FMT_YUV420P;
 
-    ff_h261_common_init();
     h261_decode_init_vlc(h);
 
     h->gob_start_code_skipped = 0;