]> git.sesse.net Git - ffmpeg/commit
avcodec/mpeg12: Don't initialize encoder-only parts of RLTable
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 8 Dec 2020 19:25:23 +0000 (20:25 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 31 Dec 2020 10:11:59 +0000 (11:11 +0100)
commit6e8fcd9c5624c1a89e49803de9e10562ace61b6a
tree68007453ffc341058d2624de2bf1fb4b02ec8761
parent1ead0c6388ba7f74ccb0c3e991a49600c92c877e
avcodec/mpeg12: Don't initialize encoder-only parts of RLTable

ff_mpeg12_init_vlcs() currently initializes index_run, max_level and
max_run of ff_rl_mpeg1/2; yet the only user of these fields is the
MPEG-1/2 encoder which already initializes these tables on its own.
So remove the initializations in ff_mpeg12_init_vlcs(); this also
simplifies making ff_mpeg12_init_vlcs() thread-safe.

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