mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/utils: free AVStream.codec properly in free_stream()
Fixes memory leaks. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
df8575584d
commit
b9d2005ea5
@ -4266,9 +4266,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);
|
||||||
|
Loading…
Reference in New Issue
Block a user