]> git.sesse.net Git - ffmpeg/commit
avcodec/speedhqenc: Call correct function
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 10 Dec 2020 07:50:37 +0000 (08:50 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 11 Dec 2020 01:20:05 +0000 (02:20 +0100)
commit628d02a6116ce5401a626254be7bfc0e68756c1d
tree866c638cc8e306fc5b4eb2ddb901bc6c7dbd3e89
parent43b4c66e6b7dc788b8c6e4c9cfdb08bfa5ef2360
avcodec/speedhqenc: Call correct function

Up until now, the SpeedHQ encoder called a wrong function for init:
void ff_init_uni_ac_vlc(const uint8_t huff_size_ac[256],
                        uint8_t *uni_ac_vlc_len);
Yet the first argument actually used is of type RLTable; the size of
said struct is less than 256 if the size of a pointer is four, leading
to an access beyond the end of the RLTable.

This commit fixes this by calling the actually intended function:
init_uni_ac_vlc() from mpeg12enc.c. It was intended to use this
function [1], yet doing so was forgotten when the patch was actually
applied.

[1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-July/266187.html

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/Makefile
libavcodec/mpeg12.h
libavcodec/mpeg12enc.c
libavcodec/speedhqenc.c