avcodec/codec_par: always free side data in the destination AVCodecContext

Signed-off-by: James Almer <jamrial@gmail.com>
pull/389/head
James Almer 1 year ago
parent 8d1316e515
commit d383ae43c2
  1. 2
      libavcodec/codec_par.c

@ -253,8 +253,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
break;
}
if (par->extradata) {
av_freep(&codec->extradata);
if (par->extradata) {
codec->extradata = av_mallocz(par->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!codec->extradata)
return AVERROR(ENOMEM);

Loading…
Cancel
Save