From: lilo_booter Date: Fri, 27 May 2005 17:53:08 +0000 (+0000) Subject: audio out fix X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=8fe450eddce6d6e81cf063af5b471b7ef750efe9;p=melted audio out fix git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@726 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index 1c58ce0..1f10f6b 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -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 );