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
// 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 );
}
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 );