]> git.sesse.net Git - mlt/commitdiff
Revert commits e49264, c9cb51, and e7a775.
authorDan Dennedy <dan@dennedy.org>
Sat, 7 May 2011 04:54:29 +0000 (21:54 -0700)
committerDan Dennedy <dan@dennedy.org>
Sat, 7 May 2011 04:54:29 +0000 (21:54 -0700)
These commits are related to kdenlive bugs 1962 and 2003.
This is about an a/v sync problem when using full duration of a file.
The changes are reverted because I believe the root cause is returning
fewer samples than requested on the last frame of audio, and that was
fixed in the previous commit.
Also, the adjust_length property is removed because it did not work; the
property was not available when trying to get it from within the
constructor. The correct way to adjust the length is to first get the
length and then set the length and out properties.

src/modules/avformat/producer_avformat.c
src/modules/avformat/producer_avformat.yml

index 4d7281881c1cfa16c4ca73d7f2128208a039a920..e1f88def11d6ea45b0e93b6cfd7ef2fbb47dc8b6 100644 (file)
@@ -661,14 +661,7 @@ static int producer_open( producer_avformat self, mlt_profile profile, char *fil
                        if ( context->duration != AV_NOPTS_VALUE )
                        {
                                // This isn't going to be accurate for all formats
-                               // Workaround some clips whose estimated duration cause problems:
-                               // http://www.kdenlive.org/mantis/view.php?id=2003
-                               int adjust = -3;
-                               if ( mlt_properties_get( properties, "adjust_length" ) )
-                                       adjust = mlt_properties_get_int( properties, "adjust_length" );
-                               mlt_position frames = ( mlt_position )( ( ( double )context->duration / ( double )AV_TIME_BASE ) * fps + adjust );
-                               if  ( mlt_properties_get_position( properties, "force_length" ) > 0 )
-                                       frames = mlt_properties_get_position( properties, "force_length" );
+                               mlt_position frames = ( mlt_position )( ( ( double )context->duration / ( double )AV_TIME_BASE ) * fps );
                                mlt_properties_set_position( properties, "out", frames - 1 );
                                mlt_properties_set_position( properties, "length", frames );
                        }
index c9810d1f46b8c8538ecbb6e93adaa3e4912e6144..cb878530b898fbf2a76656189f781df667644370 100644 (file)
@@ -138,11 +138,6 @@ parameters:
     description: if the resource can seek
     readonly: yes
 
-  - identifier: adjust_length
-    title: Adjust length
-    type: time
-    description: Adjust the detected length.
-
   - identifier: width
     title: Width
     type: integer