[FFmpeg-cvslog] lavc/pthread_frame: do not copy AVCodecInternal contents

Anton Khirnov git at videolan.org
Wed May 11 11:38:15 EEST 2022


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Mar 23 16:30:01 2022 +0100| [28b8b41e5acecdb0c2e5f7a3b69c14706548aa0a] | committer: Anton Khirnov

lavc/pthread_frame: do not copy AVCodecInternal contents

None of its fields have meaningful values at that point that would need
to be copied to frame thread workers.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=28b8b41e5acecdb0c2e5f7a3b69c14706548aa0a
---

 libavcodec/pthread_frame.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 10b84e57b0..c667706206 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -791,7 +791,7 @@ static av_cold int init_thread(PerThreadContext *p, int *threads_to_free,
     p->parent = fctx;
     p->avctx  = copy;
 
-    copy->internal = av_memdup(avctx->internal, sizeof(*avctx->internal));
+    copy->internal = av_mallocz(sizeof(*copy->internal));
     if (!copy->internal)
         return AVERROR(ENOMEM);
     copy->internal->thread_ctx = p;



More information about the ffmpeg-cvslog mailing list