producer_inigo.c: display a warning when failed to load a file.
[melted] / src / modules / inigo / producer_inigo.c
index 0ecbde4..3c72372 100644 (file)
@@ -402,20 +402,29 @@ mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, co
                                properties = MLT_PRODUCER_PROPERTIES( producer );
                                mlt_properties_inherit( properties, group );
                        }
+                       else
+                       {
+                               fprintf( stderr, "Failed to load \"%s\"\n", argv[ i ] );
+                       }
                }
                else
                {
-                       if ( !strcmp( argv[ i ], "-serialise" ) )
-                               i += 2;
-                       else if ( !strcmp( argv[ i ], "-consumer" ) )
-                               i += 2;
-                       else if ( !strcmp( argv[ i ], "-profile" ) )
+                       int backtrack = 0;
+                       if ( !strcmp( argv[ i ], "-serialise" ) ||
+                            !strcmp( argv[ i ], "-consumer" ) ||
+                            !strcmp( argv[ i ], "-profile" ) )
+                       {
                                i += 2;
+                               backtrack = 1;
+                       }
 
                        while ( argv[ i ] != NULL && strchr( argv[ i ], '=' ) )
+                       {
                                i ++;
-
-                       i --;
+                               backtrack = 1;
+                       }
+                       if ( backtrack )
+                               i --;
                }
        }