]> git.sesse.net Git - mlt/blobdiff - src/modules/core/transition_composite.c
Feeds pseudo module added
[mlt] / src / modules / core / transition_composite.c
index 6aef888c332af23ef8ffd7db2b66e6bcfc0ec678..dda6c65f9fcfd938cb248b0d0d7568622640afbe 100644 (file)
@@ -665,7 +665,7 @@ static int get_b_frame_image( mlt_transition this, mlt_frame b_frame, uint8_t **
        mlt_properties b_props = MLT_FRAME_PROPERTIES( b_frame );
        mlt_properties properties = MLT_TRANSITION_PROPERTIES( this );
 
-       if ( mlt_properties_get( properties, "distort" ) == NULL && mlt_properties_get( b_props, "distort" ) == NULL && geometry->item.distort == 0 )
+       if ( mlt_properties_get_int( properties, "distort" ) == 0 && mlt_properties_get_int( b_props, "distort" ) == 0 && geometry->item.distort == 0 )
        {
                // Adjust b_frame pixel aspect
                int normalised_width = geometry->item.w;
@@ -878,14 +878,17 @@ mlt_frame composite_copy_region( mlt_transition this, mlt_frame a_frame, mlt_pos
                x = 0;
        }
 
-       // Copy the region of the image
-       p = image + y * ss + x * 2;
-
-       while ( h -- )
+       if ( w > 0 && h > 0 )
        {
-               inline_memcpy( dest, p, w * 2 );
-               dest += ds;
-               p += ss;
+               // Copy the region of the image
+               p = image + y * ss + x * 2;
+
+               while ( h -- )
+               {
+                       inline_memcpy( dest, p, w * 2 );
+                       dest += ds;
+                       p += ss;
+               }
        }
 
        // Assign this position to the b frame