[FFmpeg-cvslog] avcodec/mpeg12dec: Really disable scratchpad allocations
Andreas Rheinhardt
git at videolan.org
Tue Mar 4 14:35:43 EET 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Feb 25 16:40:56 2025 +0100| [8d871622542bd596ecf041eceb11716a2b4e47bb] | committer: Andreas Rheinhardt
avcodec/mpeg12dec: Really disable scratchpad allocations
ba341be09533a077075c71fce5f9dc5b73504234 disabled them for
the main thread only, not the slice threads.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8d871622542bd596ecf041eceb11716a2b4e47bb
---
libavcodec/mpeg12dec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index abef0a6155..843640edbf 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1001,7 +1001,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
if ((ret = ff_mpv_common_init(s)) < 0)
return ret;
if (!s->avctx->lowres)
- ff_mpv_framesize_disable(&s->sc);
+ for (int i = 0; i < s->slice_context_count; i++)
+ ff_mpv_framesize_disable(&s->thread_context[i]->sc);
}
return 0;
}
@@ -1874,7 +1875,8 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
if ((ret = ff_mpv_common_init(s)) < 0)
return ret;
if (!s->avctx->lowres)
- ff_mpv_framesize_disable(&s->sc);
+ for (int i = 0; i < s->slice_context_count; i++)
+ ff_mpv_framesize_disable(&s->thread_context[i]->sc);
for (i = 0; i < 64; i++) {
int j = s->idsp.idct_permutation[i];
More information about the ffmpeg-cvslog
mailing list