From: Dan Dennedy Date: Sat, 26 Feb 2011 05:10:10 +0000 (-0800) Subject: Add support for pix_fmt on avformat resource URL. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=1d33591b33bedcafe24c43d1653791305453c92e;p=mlt Add support for pix_fmt on avformat resource URL. For example, libdc1394:/dev/raw1394?frame_rate:15\&pix_fmt:yuv422 makes a Firewire digital camera (not DV camcorder) on Linux work. --- diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c index b1c6302f..b9dbbeca 100644 --- a/src/modules/avformat/producer_avformat.c +++ b/src/modules/avformat/producer_avformat.c @@ -518,7 +518,6 @@ static int producer_open( producer_avformat this, mlt_profile profile, char *fil params->width = 640; params->height = 480; params->time_base= (AVRational){1,25}; - // params->device = file; params->channels = 2; params->sample_rate = 48000; } @@ -547,6 +546,8 @@ static int producer_open( producer_avformat this, mlt_profile profile, char *fil params->channel = atoi( value ); else if ( !strcmp( name, "channels" ) ) params->channels = atoi( value ); + else if ( !strcmp( name, "pix_fmt" ) ) + params->pix_fmt = av_get_pix_fmt( value ); else if ( !strcmp( name, "width" ) ) params->width = atoi( value ); else if ( !strcmp( name, "height" ) )