]> git.sesse.net Git - mlt/commitdiff
Prevent closing alreadu closed AVCoddecContexts.
authorDan Dennedy <dan@dennedy.org>
Thu, 6 Oct 2011 05:47:17 +0000 (22:47 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 6 Oct 2011 05:47:17 +0000 (22:47 -0700)
Patch supplied by Mikko Rapeli.

src/modules/avformat/producer_avformat.c

index 3829d2028d967c8ba797beca62651c24b3a092b3..66ff6abddd8c314ac27de7276c370dfc0e8be1e6 100644 (file)
@@ -2552,9 +2552,11 @@ static void producer_avformat_close( producer_avformat self )
                av_free( self->decode_buffer[i] );
                if ( self->audio_codec[i] )
                        avcodec_close( self->audio_codec[i] );
+               self->audio_codec[i] = NULL;
        }
        if ( self->video_codec )
                avcodec_close( self->video_codec );
+       self->video_codec = NULL;
        // Close the file
        if ( self->dummy_context )
                av_close_input_file( self->dummy_context );