diff options
author | Aaron Levinson <alevinsn@aracnet.com> | 2017-04-20 23:30:13 -0700 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-05-17 16:27:25 -0300 |
commit | c54a76bf714b07cf316da06ffeac1a1d753a15f3 (patch) | |
tree | a4ba79a9901001dbcd44c5b50a408ecfd2b0fad1 | |
parent | 676ba8eff86d2ed1e9eb14d09c87c7ed41cadc7f (diff) | |
download | ffmpeg-c54a76bf714b07cf316da06ffeac1a1d753a15f3.tar.gz |
avformat/utils: free AVStream.codec properly in free_stream()
Fixes memory leaks.
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit b9d2005ea5d6837917a69bc2b8e98f5695f54e39)
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index b199ff23bf..f90aeb20c1 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3728,9 +3728,7 @@ static void free_stream(AVStream **pst) av_dict_free(&st->metadata); av_freep(&st->probe_data.buf); av_freep(&st->index_entries); - av_freep(&st->codec->extradata); - av_freep(&st->codec->subtitle_header); - av_freep(&st->codec); + avcodec_free_context(&st->codec); av_freep(&st->priv_data); if (st->info) av_freep(&st->info->duration_error); |