mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 02:20:07 +01: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:
committed by
James Almer
parent
65add3a818
commit
9cf601f87d
@@ -4120,9 +4120,7 @@ static void free_stream(AVStream **pst)
|
|||||||
av_freep(&st->index_entries);
|
av_freep(&st->index_entries);
|
||||||
#if FF_API_LAVF_AVCTX
|
#if FF_API_LAVF_AVCTX
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
av_freep(&st->codec->extradata);
|
avcodec_free_context(&st->codec);
|
||||||
av_freep(&st->codec->subtitle_header);
|
|
||||||
av_freep(&st->codec);
|
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
av_freep(&st->priv_data);
|
av_freep(&st->priv_data);
|
||||||
|
|||||||
Reference in New Issue
Block a user