Commit b9d2005e authored by Aaron Levinson's avatar Aaron Levinson Committed by James Almer

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

Fixes memory leaks.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent df857558
......@@ -4266,9 +4266,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment