diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-05-03 18:04:49 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-12 11:14:32 +0200 |
commit | 101ed72c2f330163a2e25377b1725cc34852315d (patch) | |
tree | fb55c169fed52c5e4a6a145aa063352dd45a9221 /libavcodec/mpegpicture.c | |
parent | 2cbca73975c967eae3e704f432df4bd4c830dd58 (diff) | |
download | ffmpeg-101ed72c2f330163a2e25377b1725cc34852315d.tar.gz |
avcodec/h263, mpeg(picture|video): Only allocate mbskip_table for MPEG-4
It is the only user of said table and doing so is especially
important given that this buffer is zeroed every time.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegpicture.c')
-rw-r--r-- | libavcodec/mpegpicture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c index ad6157f0c1..ca265da9fc 100644 --- a/libavcodec/mpegpicture.c +++ b/libavcodec/mpegpicture.c @@ -138,10 +138,11 @@ static int alloc_picture_tables(BufferPoolContext *pools, Picture *pic, if (!pic->name ## buf_suffix idx_suffix) \ return AVERROR(ENOMEM); \ } while (0) - GET_BUFFER(mbskip_table,,); GET_BUFFER(qscale_table, _base,); GET_BUFFER(mb_type, _base,); if (pools->motion_val_pool) { + if (pools->mbskip_table_pool) + GET_BUFFER(mbskip_table,,); for (int i = 0; i < 2; i++) { GET_BUFFER(ref_index,, [i]); GET_BUFFER(motion_val, _base, [i]); |