stdout fix for avformat consumer and change of defaults for inigo transition tracks
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 21 Jun 2004 09:02:14 +0000 (09:02 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 21 Jun 2004 09:02:14 +0000 (09:02 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@333 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/avformat/consumer_avformat.c
src/modules/inigo/producer_inigo.c

index b21ba27..7532802 100644 (file)
@@ -663,7 +663,7 @@ static void *consumer_thread( void *arg )
                fmt = guess_format( "mpeg", NULL, NULL );
 
        // We need a filename - default to stdout?
-       if ( filename == NULL )
+       if ( filename == NULL || !strcmp( filename, "" ) )
                filename = "pipe:";
 
        // Get the codec ids selected
@@ -723,7 +723,7 @@ static void *consumer_thread( void *arg )
                // Open the output file, if needed
                if ( !( fmt->flags & AVFMT_NOFILE ) ) 
                {
-                       if (url_fopen(&oc->pb, filename, URL_RDWR) < 0) 
+                       if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) 
                        {
                                fprintf(stderr, "Could not open '%s'\n", filename);
                                mlt_properties_set_int( properties, "running", 0 );
index 1e6b4bb..35e84ad 100644 (file)
@@ -144,7 +144,7 @@ mlt_producer producer_inigo_init( char **argv )
                }
                else if ( !strcmp( argv[ i ], "-transition" ) )
                {
-                       mlt_transition transition = create_transition( field, argv[ ++ i ], track );
+                       mlt_transition transition = create_transition( field, argv[ ++ i ], track - 1 );
                        if ( transition != NULL )
                        {
                                properties = mlt_transition_properties( transition );