aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-10 08:50:37 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-11 02:20:05 +0100
commit628d02a6116ce5401a626254be7bfc0e68756c1d (patch)
tree866c638cc8e306fc5b4eb2ddb901bc6c7dbd3e89 /libavcodec/mpeg12.h
parent43b4c66e6b7dc788b8c6e4c9cfdb08bfa5ef2360 (diff)
downloadffmpeg-628d02a6116ce5401a626254be7bfc0e68756c1d.tar.gz
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>
Diffstat (limited to 'libavcodec/mpeg12.h')
-rw-r--r--libavcodec/mpeg12.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpeg12.h b/libavcodec/mpeg12.h
index 345d473d3a..9a7c2b66b3 100644
--- a/libavcodec/mpeg12.h
+++ b/libavcodec/mpeg12.h
@@ -37,6 +37,7 @@ void ff_mpeg12_common_init(MpegEncContext *s);
}
void ff_init_2d_vlc_rl(RLTable *rl, unsigned static_size, int flags);
+void ff_mpeg1_init_uni_ac_vlc(const RLTable *rl, uint8_t *uni_ac_vlc_len);
static inline int decode_dc(GetBitContext *gb, int component)
{