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:
parent
65add3a818
commit
9cf601f87d
1 changed files with 1 additions and 3 deletions
|
|
@ -4120,9 +4120,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue