]> git.sesse.net Git - mlt/commitdiff
Fix framebuffer crash & clip duration error
authorj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 31 May 2007 13:41:46 +0000 (13:41 +0000)
committerj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 31 May 2007 13:41:46 +0000 (13:41 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@973 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/kdenlive/producer_framebuffer.c

index 4a1393e9a0676ee438e400a3b9acca9d5c4e2946..d58f8a0685ec61a1387bf33333bd65a563d776e5 100644 (file)
@@ -47,6 +47,9 @@ static int framebuffer_get_image( mlt_frame this, uint8_t **image, mlt_image_for
        mlt_properties frame_properties = MLT_FRAME_PROPERTIES( this );
        mlt_properties first_frame_properties = MLT_FRAME_PROPERTIES( first_frame );
 
+       *width = mlt_properties_get_int( frame_properties, "width" );
+       *height = mlt_properties_get_int( frame_properties, "height" );
+
        // image stride
        int size, xstride, ystride;
        switch( *format ){
@@ -247,7 +250,7 @@ mlt_producer producer_framebuffer_init( char *arg )
                if ( speed != 1.0 )
                {
                        double real_length = (double)  mlt_producer_get_length( real_producer );
-                       mlt_properties_set_position( properties, "length", real_length * 2 / speed );
+                       mlt_properties_set_position( properties, "length", real_length / speed );
                }
 
                // Since we control the seeking, prevent it from seeking on its own