Skip to content

Commit

Permalink
avcodec/dnxhdenc: do not free nonexistent slice threads data when fra…
Browse files Browse the repository at this point in the history
…me threading is used

Forgotten in 28e9ba9.
Fixes #7241.

Signed-off-by: Paul B Mahol <[email protected]>
  • Loading branch information
richardpl committed Jun 1, 2018
1 parent 04b5708 commit 0d35413
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libavcodec/dnxhdenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1369,8 +1369,10 @@ static av_cold int dnxhd_encode_end(AVCodecContext *avctx)
av_freep(&ctx->qmatrix_c16);
av_freep(&ctx->qmatrix_l16);

for (i = 1; i < avctx->thread_count; i++)
av_freep(&ctx->thread[i]);
if (avctx->active_thread_type == FF_THREAD_SLICE) {
for (i = 1; i < avctx->thread_count; i++)
av_freep(&ctx->thread[i]);
}

return 0;
}
Expand Down

0 comments on commit 0d35413

Please sign in to comment.