X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Favformat%2Fconsumer_avformat.c;h=1f10f6b331fa847a167ea6fc4c2f1cca064306db;hb=8fe450eddce6d6e81cf063af5b471b7ef750efe9;hp=1c58ce0263bc12d8a415a2260214f3545220fb02;hpb=10be0eed6b4e815fa4f6c3942598eecaef3ce058;p=melted 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 );