avcodec/codec_par: always clear extradata_size in avcodec_parameters_to_context()
Missed in d383ae43c266b160348db04f2fd17ccf30286784. Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit c4e3d6cdb066425a5f5a2e05def9470a47a6082c)
This commit is contained in:
parent
13e93ffbfd
commit
506fbe681c
@ -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…
x
Reference in New Issue
Block a user