else if ( !strcmp( argv[ i ], "-consumer" ) )
{
consumer = create_consumer( argv[ ++ i ], inigo );
- while ( strstr( argv[ ++ i ], "=" ) )
- mlt_properties_parse( group, argv[ i ] );
- i --;
+ while ( argv[ i + 1 ] != NULL && strstr( argv[ i + 1 ], "=" ) )
+ mlt_properties_parse( group, argv[ ++ i ] );
}
else
{
// Transport functionality
transport( inigo );
- // Close the consumer
- mlt_consumer_close( consumer );
}
else if ( store != NULL )
{
fclose( store );
}
- // Close the producer
- mlt_producer_close( inigo );
}
else
{
" [ producer [ name=value ] * ]+\n" );
}
+ // Close the consumer
+ if ( consumer != NULL )
+ mlt_consumer_close( consumer );
+
+ // Close the producer
+ if ( inigo != NULL )
+ mlt_producer_close( inigo );
+
// Close the factory
mlt_factory_close( );
// Parse the arguments
for ( i = 0; argv[ i ] != NULL; i ++ )
{
- if ( !strcmp( argv[ i ], "-serialise" ) )
- {
- i ++;
- }
- else if ( !strcmp( argv[ i ], "-group" ) )
+ if ( !strcmp( argv[ i ], "-group" ) )
{
if ( mlt_properties_count( group ) != 0 )
{
}
else
{
- while ( argv[ i ] != NULL && argv[ i ][ 0 ] != '-' )
+ if ( !strcmp( argv[ i ], "-serialise" ) )
+ i ++;
+ else if ( !strcmp( argv[ i ], "-consumer" ) )
+ i ++;
+ else while ( argv[ i ] != NULL && argv[ i ][ 0 ] != '-' )
i ++;
- i --;
}
}
else if ( !strcmp( argv[ i ], "-consumer" ) )
{
consumer = create_consumer( argv[ ++ i ], inigo );
- while ( strstr( argv[ ++ i ], "=" ) )
- mlt_properties_parse( group, argv[ i ] );
- i --;
+ while ( argv[ i + 1 ] != NULL && strstr( argv[ i + 1 ], "=" ) )
+ mlt_properties_parse( group, argv[ ++ i ] );
}
else
{
// Transport functionality
transport( inigo );
- // Close the consumer
- mlt_consumer_close( consumer );
}
else if ( store != NULL )
{
fclose( store );
}
- // Close the producer
- mlt_producer_close( inigo );
}
else
{
" [ producer [ name=value ] * ]+\n" );
}
+ // Close the consumer
+ if ( consumer != NULL )
+ mlt_consumer_close( consumer );
+
+ // Close the producer
+ if ( inigo != NULL )
+ mlt_producer_close( inigo );
+
// Close the factory
mlt_factory_close( );
// Parse the arguments
for ( i = 0; argv[ i ] != NULL; i ++ )
{
- if ( !strcmp( argv[ i ], "-serialise" ) )
- {
- i ++;
- }
- else if ( !strcmp( argv[ i ], "-group" ) )
+ if ( !strcmp( argv[ i ], "-group" ) )
{
if ( mlt_properties_count( group ) != 0 )
{
}
else
{
- while ( argv[ i ] != NULL && argv[ i ][ 0 ] != '-' )
+ if ( !strcmp( argv[ i ], "-serialise" ) )
+ i ++;
+ else if ( !strcmp( argv[ i ], "-consumer" ) )
+ i ++;
+ else while ( argv[ i ] != NULL && argv[ i ][ 0 ] != '-' )
i ++;
- i --;
}
}