[FFmpeg-cvslog] avcodec/codec_par: always free side data in the destination AVCodecContext
James Almer
git at videolan.org
Tue Jul 25 20:13:59 EEST 2023
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Jul 20 19:55:24 2023 -0300| [d383ae43c266b160348db04f2fd17ccf30286784] | committer: James Almer
avcodec/codec_par: always free side data in the destination AVCodecContext
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d383ae43c266b160348db04f2fd17ccf30286784
---
libavcodec/codec_par.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list