fezzik now accepts service:resource and strips \'avformat:\' before fallback avformat...
[melted] / src / modules / fezzik / producer_fezzik.c
index d5f686e..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 line fallbacks 
+       // 4th - allow explicit construction
        if ( result == NULL )
-               result = mlt_factory_producer( "ffmpeg", file );
+       {
+               char *arg = strchr( file, ':' );
+               if ( arg )
+               {
+                       arg[0] = 0;
+                       arg++;
+               }
+               result = mlt_factory_producer( file, arg );
+       }
 
        return result;
 }
@@ -136,6 +145,7 @@ mlt_producer producer_fezzik_init( char *arg )
                        mlt_properties_set_data( properties, "producer", producer, 0, ( mlt_destructor )mlt_producer_close, NULL );
 
                        // Now attach normalising filters
+                       last = create_filter( tractor, last, "deinterlace" );
                        last = create_filter( tractor, last, "rescale" );
                        last = create_filter( tractor, last, "resize" );
                        last = create_filter( tractor, last, "resample" );
@@ -164,4 +174,3 @@ mlt_producer producer_fezzik_init( char *arg )
        // Return the tractor's producer
        return producer;
 }
-