Browse Source

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)
tags/n3.0.8
Aaron Levinson James Almer 8 years ago
parent
commit
c54a76bf71
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      libavformat/utils.c

+ 1
- 3
libavformat/utils.c View File

@@ -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);


Loading…
Cancel
Save