1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-23 04:24:35 +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 b9d2005ea5d6837917a69bc2b8e98f5695f54e39)
This commit is contained in:
Aaron Levinson 2017-04-20 23:30:13 -07:00 committed by James Almer
parent 8119efdbec
commit 329176adc5

View File

@ -4146,9 +4146,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);