summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-03-23 16:30:01 +0100
committerAnton Khirnov <anton@khirnov.net>2022-05-11 10:37:26 +0200
commit28b8b41e5acecdb0c2e5f7a3b69c14706548aa0a (patch)
tree02075a96aef36054069091868fa485a8da94e35c /libavcodec
parent2cb86cd00c64ff16b16920eec37ec5b25a59b284 (diff)
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.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pthread_frame.c2
1 files changed, 1 insertions, 1 deletions
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;