With the following example:
```c
#include <stdio.h>
#include <unistd.h>
#include <mlt-7/framework/mlt.h>

int main( int argc, char *argv[] )
{
// Initialise the factory
if ( mlt_factory_init( NULL ) != 0 )
{
mlt_profile p = mlt_profile_init(NULL);

// Create the default consumer
mlt_consumer hello = mlt_factory_consumer( p, "sdl2", NULL ); // xgl, sdl,

// Create via the default producer
mlt_producer world = mlt_factory_producer( p, NULL,
"avformat:/home/jose/Descargas/sygic.mp4" );

// Connect the producer to the consumer
mlt_consumer_connect( hello, mlt_producer_service( world ) );

// Start the consumer
mlt_consumer_start( hello );

// Wait for the consumer to terminate
while( !mlt_consumer_is_stopped( hello ) )
sleep( 1 );

// Close the consumer
mlt_consumer_close( hello );

// Close the producer
mlt_producer_close( world );

// Close the factory
mlt_factory_close( );
}
else
{
// Report an error during initialisation
fprintf( stderr, "Unable to locate factory modules\n" );
}

// End of program
return 0;
}
```

I compile it and run it like:
```
$ gcc ex.c -o ex -lmlt-7
$ ./ex
```
I never get the `mlt_consumer_is_stopped` set to True.  The played video
finishes but the exit condition for the while loop is never reached.

Why is that?
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to