From: Dan Dennedy Date: Mon, 15 Feb 2010 06:12:25 +0000 (-0800) Subject: Fix mlt_sample_calculator returning negative result. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=57cf9ebda1935cacf86a2585f5d68a893c244bcd;p=mlt Fix mlt_sample_calculator returning negative result. --- diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index 6ca88242..0b9abf20 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -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.