diff options
author | Anshul Maheshwari <er.anshul.maheshwari@gmail.com> | 2013-06-27 15:39:19 +0530 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-21 15:52:50 +0200 |
commit | 0f229f9b91fe3c4ebd97e88f004d638819b76add (patch) | |
tree | 6da3925d41f7cdf810e1444c620fb3f007afb15a | |
parent | db0384c9c962f403051d5441271311fd441f3675 (diff) | |
download | ffmpeg-0f229f9b91fe3c4ebd97e88f004d638819b76add.tar.gz |
avformat/utils: Close codec context since it is allocated by avformat_new_stream in refrence to ticket 2716
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 9fd5e6e3e5..202933e9b7 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3178,6 +3178,9 @@ void ff_free_stream(AVFormatContext *s, AVStream *st){ av_assert0(s->nb_streams>0); av_assert0(s->streams[ s->nb_streams-1 ] == st); + if (st->codec) { + avcodec_close(st->codec); + } if (st->parser) { av_parser_close(st->parser); } |