]> git.sesse.net Git - mlt/blobdiff - src/modules/core/transition_composite.c
Luma and composite fixes
[mlt] / src / modules / core / transition_composite.c
index 6aef888c332af23ef8ffd7db2b66e6bcfc0ec678..e35d365be890096498c87e3b52b1c2d68af54e40 100644 (file)
@@ -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