fezzik now accepts service:resource and strips \'avformat:\' before fallback avformat...
[melted] / src / modules / fezzik / producer_fezzik.c
index bcc801c..e409afc 100644 (file)
@@ -81,11 +81,20 @@ static mlt_producer create_producer( char *file )
 
        // 3rd line fallbacks 
        if ( result == NULL )
-               result = mlt_factory_producer( "avformat", file );
+               result = mlt_factory_producer( "avformat", file + 
+                       ( strncmp( file, "avformat:", 9 ) ? 0 : 9 ) );
 
        // 4th - allow explicit construction
        if ( result == NULL )
-               result = mlt_factory_producer( file, NULL );
+       {
+               char *arg = strchr( file, ':' );
+               if ( arg )
+               {
+                       arg[0] = 0;
+                       arg++;
+               }
+               result = mlt_factory_producer( file, arg );
+       }
 
        return result;
 }
@@ -165,4 +174,3 @@ mlt_producer producer_fezzik_init( char *arg )
        // Return the tractor's producer
        return producer;
 }
-