mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/dnxhdenc: return error if av_malloc failed
Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
ced3b8c61e
commit
3def984a98
@ -542,6 +542,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->active_thread_type == FF_THREAD_SLICE) {
|
||||
for (i = 1; i < avctx->thread_count; i++) {
|
||||
ctx->thread[i] = av_malloc(sizeof(DNXHDEncContext));
|
||||
if (!ctx->thread[i])
|
||||
goto fail;
|
||||
memcpy(ctx->thread[i], ctx, sizeof(DNXHDEncContext));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user