1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

avformat/utils: free AVStream.codec properly in free_stream()

Fixes memory leaks.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit b9d2005ea5)
This commit is contained in:
Aaron Levinson 2017-04-20 23:30:13 -07:00 committed by James Almer
parent 1c302b606e
commit 0109a152a1

View File

@ -3683,9 +3683,7 @@ void ff_free_stream(AVFormatContext *s, AVStream *st) {
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);