ffmpeg | branch: release/3.2 | Aaron Levinson <alevi...@aracnet.com> | Thu Apr 20 23:30:13 2017 -0700| [9cf601f87da8bfa8a1bab46c538cfab9deff730d] | committer: James Almer
avformat/utils: free AVStream.codec properly in free_stream() Fixes memory leaks. Signed-off-by: James Almer <jamr...@gmail.com> (cherry picked from commit b9d2005ea5d6837917a69bc2b8e98f5695f54e39) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9cf601f87da8bfa8a1bab46c538cfab9deff730d --- libavformat/utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 55f23bab29..6d0f888aa8 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4120,9 +4120,7 @@ static void free_stream(AVStream **pst) av_freep(&st->index_entries); #if FF_API_LAVF_AVCTX FF_DISABLE_DEPRECATION_WARNINGS - av_freep(&st->codec->extradata); - av_freep(&st->codec->subtitle_header); - av_freep(&st->codec); + avcodec_free_context(&st->codec); FF_ENABLE_DEPRECATION_WARNINGS #endif av_freep(&st->priv_data); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog