From: lilo_booter Date: Sat, 10 Jan 2004 19:51:07 +0000 (+0000) Subject: in/out fix X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=97ba4ff55eb0d455f32709b2cc9e3b03359eda95;p=melted in/out fix git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@49 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/mlt/src/framework/mlt_playlist.c b/mlt/src/framework/mlt_playlist.c index 32179aa..300dcc1 100644 --- a/mlt/src/framework/mlt_playlist.c +++ b/mlt/src/framework/mlt_playlist.c @@ -219,7 +219,7 @@ static mlt_producer mlt_playlist_virtual_seek( mlt_playlist this ) // Seek in real producer to relative position if ( producer != NULL ) { - mlt_producer_seek_frame( producer, position ); + mlt_producer_seek_frame( producer, position + mlt_producer_frame_position( producer, mlt_producer_get_in( producer ) ) ); } else if ( total > 0 ) { @@ -398,8 +398,9 @@ int mlt_playlist_clear( mlt_playlist this ) int mlt_playlist_append( mlt_playlist this, mlt_producer producer ) { // Append to virtual list + int64_t in = mlt_producer_frame_position( producer, mlt_producer_get_in( producer ) ); int64_t out = mlt_producer_frame_position( producer, mlt_producer_get_out( producer ) ); - return mlt_playlist_virtual_append( this, producer, 0, out ); + return mlt_playlist_virtual_append( this, producer, 0, out - in ); } /** Append a producer to the playlist with in/out points. @@ -412,7 +413,7 @@ int mlt_playlist_append_io( mlt_playlist this, mlt_producer producer, double in, { int64_t fin = mlt_producer_frame_position( producer, in ); int64_t fout = mlt_producer_frame_position( producer, out ); - return mlt_playlist_virtual_append( this, producer, fin, fout ); + return mlt_playlist_virtual_append( this, producer, 0, fout - fin ); } else { diff --git a/src/framework/mlt_playlist.c b/src/framework/mlt_playlist.c index 32179aa..300dcc1 100644 --- a/src/framework/mlt_playlist.c +++ b/src/framework/mlt_playlist.c @@ -219,7 +219,7 @@ static mlt_producer mlt_playlist_virtual_seek( mlt_playlist this ) // Seek in real producer to relative position if ( producer != NULL ) { - mlt_producer_seek_frame( producer, position ); + mlt_producer_seek_frame( producer, position + mlt_producer_frame_position( producer, mlt_producer_get_in( producer ) ) ); } else if ( total > 0 ) { @@ -398,8 +398,9 @@ int mlt_playlist_clear( mlt_playlist this ) int mlt_playlist_append( mlt_playlist this, mlt_producer producer ) { // Append to virtual list + int64_t in = mlt_producer_frame_position( producer, mlt_producer_get_in( producer ) ); int64_t out = mlt_producer_frame_position( producer, mlt_producer_get_out( producer ) ); - return mlt_playlist_virtual_append( this, producer, 0, out ); + return mlt_playlist_virtual_append( this, producer, 0, out - in ); } /** Append a producer to the playlist with in/out points. @@ -412,7 +413,7 @@ int mlt_playlist_append_io( mlt_playlist this, mlt_producer producer, double in, { int64_t fin = mlt_producer_frame_position( producer, in ); int64_t fout = mlt_producer_frame_position( producer, out ); - return mlt_playlist_virtual_append( this, producer, fin, fout ); + return mlt_playlist_virtual_append( this, producer, 0, fout - fin ); } else {