Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- libavcodec/dnxhdenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 1df5346e62..1a59815472 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -516,10 +516,9 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx) ctx->thread[0] = ctx; if (avctx->active_thread_type == FF_THREAD_SLICE) { for (i = 1; i < avctx->thread_count; i++) { - ctx->thread[i] = av_malloc(sizeof(DNXHDEncContext)); + ctx->thread[i] = av_memdup(ctx, sizeof(DNXHDEncContext)); if (!ctx->thread[i]) return AVERROR(ENOMEM); - memcpy(ctx->thread[i], ctx, sizeof(DNXHDEncContext)); } } -- 2.27.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".