audio out fix
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 27 May 2005 17:53:08 +0000 (17:53 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 27 May 2005 17:53:08 +0000 (17:53 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@726 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/avformat/consumer_avformat.c

index 1c58ce0..1f10f6b 100644 (file)
@@ -772,7 +772,8 @@ static void *consumer_thread( void *arg )
        }
 
        // Allocate picture
-       output = alloc_picture( video_st->codec.pix_fmt, width, height );
+       if ( video_st )
+               output = alloc_picture( video_st->codec.pix_fmt, width, height );
 
        // Last check - need at least one stream
        if ( audio_st == NULL && video_st == NULL )
@@ -1003,7 +1004,8 @@ static void *consumer_thread( void *arg )
                url_fclose(&oc->pb);
 
        // Clean up input and output frames
-       av_free( output->data[0] );
+       if ( output )
+               av_free( output->data[0] );
        av_free( output );
        av_free( input->data[0] );
        av_free( input );