]> git.sesse.net Git - mlt/commitdiff
multitrack eof handling
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 11 Jan 2004 19:38:37 +0000 (19:38 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 11 Jan 2004 19:38:37 +0000 (19:38 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@56 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt/src/framework/mlt_multitrack.c
src/framework/mlt_multitrack.c

index b35754643eb19a45d4069d1a5da8e00c015cbc0e..893cef5f6b9c457cdb8751172c42253f917e9cbd 100644 (file)
@@ -121,6 +121,10 @@ void mlt_multitrack_refresh( mlt_multitrack this )
                // If it's allocated then, update our stats
                if ( producer != NULL )
                {
+                       // If we have more than 1 track, we must be in continue mode
+                       if ( this->count > 1 )
+                               mlt_properties_set( mlt_producer_properties( producer ), "eof", "continue" );
+                       
                        // Determine the longest length
                        length = mlt_producer_get_playtime( producer ) > length ? mlt_producer_get_playtime( producer ) : length;
                        
@@ -160,10 +164,6 @@ int mlt_multitrack_connect( mlt_multitrack this, mlt_producer producer, int trac
 
        if ( result == 0 )
        {
-               // If it's a playlist, we need to make sure it doesn't pause at end
-               mlt_properties properties = mlt_producer_properties( producer );
-               mlt_properties_set( properties, "eof", "continue" );
-
                // Resize the producer list if need be
                if ( track >= this->size )
                {
index b35754643eb19a45d4069d1a5da8e00c015cbc0e..893cef5f6b9c457cdb8751172c42253f917e9cbd 100644 (file)
@@ -121,6 +121,10 @@ void mlt_multitrack_refresh( mlt_multitrack this )
                // If it's allocated then, update our stats
                if ( producer != NULL )
                {
+                       // If we have more than 1 track, we must be in continue mode
+                       if ( this->count > 1 )
+                               mlt_properties_set( mlt_producer_properties( producer ), "eof", "continue" );
+                       
                        // Determine the longest length
                        length = mlt_producer_get_playtime( producer ) > length ? mlt_producer_get_playtime( producer ) : length;
                        
@@ -160,10 +164,6 @@ int mlt_multitrack_connect( mlt_multitrack this, mlt_producer producer, int trac
 
        if ( result == 0 )
        {
-               // If it's a playlist, we need to make sure it doesn't pause at end
-               mlt_properties properties = mlt_producer_properties( producer );
-               mlt_properties_set( properties, "eof", "continue" );
-
                // Resize the producer list if need be
                if ( track >= this->size )
                {