avcodec/codec_par: always clear extradata_size in avcodec_parameters_to_context()

Missed in d383ae43c2.

Signed-off-by: James Almer <jamrial@gmail.com>
release/7.1
James Almer 7 months ago
parent ecf87dd230
commit c4e3d6cdb0
  1. 1
      libavcodec/codec_par.c

@ -250,6 +250,7 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
}
av_freep(&codec->extradata);
codec->extradata_size = 0;
if (par->extradata) {
codec->extradata = av_mallocz(par->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!codec->extradata)

Loading…
Cancel
Save