From: ddennedy Date: Wed, 14 Jan 2009 08:37:56 +0000 (+0000) Subject: consumer_avformat.c: add support for an=1, vn=1, acodec=none, and vcodec=none options... X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=5707adef397ff18ddd1a86b71d98dde9aab440a4;p=melted consumer_avformat.c: add support for an=1, vn=1, acodec=none, and vcodec=none options (kdenlive-533) git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1315 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index d908db9..65491ea 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -867,7 +867,9 @@ static void *consumer_thread( void *arg ) video_codec_id = fmt->video_codec; // Check for audio codec overides - if ( acodec != NULL ) + if ( ( acodec && strcmp( "acodec", "none" ) == 0 ) || mlt_properties_get_int( properties, "an" ) ) + audio_codec_id = CODEC_ID_NONE; + else if ( acodec ) { AVCodec *p = avcodec_find_encoder_by_name( acodec ); if ( p != NULL ) @@ -877,7 +879,9 @@ static void *consumer_thread( void *arg ) } // Check for video codec overides - if ( vcodec != NULL ) + if ( ( vcodec && strcmp( "vcodec", "none" ) == 0 ) || mlt_properties_get_int( properties, "vn" ) ) + video_codec_id = CODEC_ID_NONE; + else if ( vcodec ) { AVCodec *p = avcodec_find_encoder_by_name( vcodec ); if ( p != NULL ) @@ -915,9 +919,9 @@ static void *consumer_thread( void *arg ) snprintf( oc->filename, sizeof(oc->filename), "%s", filename ); // Add audio and video streams - if ( fmt->video_codec != CODEC_ID_NONE ) + if ( video_codec_id != CODEC_ID_NONE ) video_st = add_video_stream( this, oc, video_codec_id ); - if ( fmt->audio_codec != CODEC_ID_NONE ) + if ( audio_codec_id != CODEC_ID_NONE ) audio_st = add_audio_stream( this, oc, audio_codec_id ); // Set the parameters (even though we have none...)