Skip to content

Commit

Permalink
lavc/frame_thread_encoder: Do not memcpy() from NULL.
Browse files Browse the repository at this point in the history
Fixes ticket #7981.
  • Loading branch information
cehoyos committed Aug 10, 2019
1 parent 690cab3 commit e82a619
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libavcodec/frame_thread_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
int ret = av_opt_copy(thread_avctx->priv_data, avctx->priv_data);
if (ret < 0)
goto fail;
} else
} else if (avctx->codec->priv_data_size) {
memcpy(thread_avctx->priv_data, avctx->priv_data, avctx->codec->priv_data_size);
}
thread_avctx->thread_count = 1;
thread_avctx->active_thread_type &= ~FF_THREAD_FRAME;

Expand Down

0 comments on commit e82a619

Please sign in to comment.