avformat/utils: Close codec context since it is allocated by avformat_new_stream...
authorAnshul Maheshwari <er.anshul.maheshwari@gmail.com>
Thu, 27 Jun 2013 10:09:19 +0000 (15:39 +0530)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Jul 2013 13:52:50 +0000 (15:52 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 9fd5e6e..202933e 100644 (file)
@@ -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);
     }