bugfixes to westley
[melted] / src / miracle / miracle_unit.c
index 2f73917..b10179b 100644 (file)
@@ -142,10 +142,9 @@ static mlt_producer create_producer( miracle_unit unit, char *file )
        {
                // 1st Line preferences
                if ( strstr( file, ".inigo" ) )
-               {
-                       char *args[ 2 ] = { file, NULL };
-                       result = mlt_factory_producer( "inigo", args );
-               }
+                       result = mlt_factory_producer( "inigo_file", file );
+               else if ( strstr( file, ".westley" ) )
+                       result = mlt_factory_producer( "westley", file );
                else if ( strstr( file, ".mpg" ) )
                        result = mlt_factory_producer( "mcmpeg", file );
                else if ( strstr( file, ".mpeg" ) )
@@ -166,7 +165,9 @@ static mlt_producer create_producer( miracle_unit unit, char *file )
                        result = mlt_factory_producer( "pixbuf", file );
                else if ( strstr( file, ".txt" ) )
                        result = mlt_factory_producer( "pango", file );
-       
+               else if ( strstr( file, ".ogg" ) )
+                       result = mlt_factory_producer( "vorbis", file );
+
                // 2nd Line fallbacks
                if ( result == NULL && strstr( file, ".dv" ) )
                        result = mlt_factory_producer( "libdv", file );
@@ -177,6 +178,10 @@ static mlt_producer create_producer( miracle_unit unit, char *file )
                if ( result == NULL )
                        result = mlt_factory_producer( "avformat", file );
 
+               // 4th line fallbacks 
+               if ( result == NULL )
+                       result = mlt_factory_producer( "ffmpeg", file );
+
                // Now store the result
                mlt_properties_set_data( properties, file, result, 0, ( mlt_destructor )mlt_producer_close, NULL );
        }