aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-07-20 19:55:24 -0300
committerJames Almer <jamrial@gmail.com>2023-07-25 14:13:42 -0300
commitd383ae43c266b160348db04f2fd17ccf30286784 (patch)
tree329cd431e308d66f4df87e8e9ffae120ab541cae
parent8d1316e51561882a30a3febb77f600a8bb6a5034 (diff)
downloadffmpeg-d383ae43c266b160348db04f2fd17ccf30286784.tar.gz
avcodec/codec_par: always free side data in the destination AVCodecContext
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/codec_par.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/codec_par.c b/libavcodec/codec_par.c
index 775c187073..a38a475dc7 100644
--- a/libavcodec/codec_par.c
+++ b/libavcodec/codec_par.c
@@ -253,8 +253,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
break;
}
+ av_freep(&codec->extradata);
if (par->extradata) {
- av_freep(&codec->extradata);
codec->extradata = av_mallocz(par->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!codec->extradata)
return AVERROR(ENOMEM);