]> git.sesse.net Git - mlt/commitdiff
Fix mlt_sample_calculator returning negative result.
authorDan Dennedy <dan@dennedy.org>
Mon, 15 Feb 2010 06:12:25 +0000 (22:12 -0800)
committerDan Dennedy <dan@dennedy.org>
Mon, 15 Feb 2010 06:12:25 +0000 (22:12 -0800)
src/framework/mlt_frame.c

index 6ca882428dd844247da123458961f8613756aa79..0b9abf2076f1879e29e49442e604b21b34f5dfb5 100644 (file)
@@ -798,8 +798,8 @@ int mlt_sample_calculator( float fps, int frequency, int64_t position )
 
        This approach should prevent rounding errors that can accumulate over a large number
        of frames causing A/V sync problems. */
-       return mlt_sample_calculator_to_now( fps, frequency, position )
-                - mlt_sample_calculator_to_now( fps, frequency, position + 1 );
+       return mlt_sample_calculator_to_now( fps, frequency, position + 1 )
+                - mlt_sample_calculator_to_now( fps, frequency, position );
 }
 
 /** Determine the number of samples that belong before a time position.