]> git.sesse.net Git - mlt/commitdiff
Safer to use the image from get_image and to compute the size.
authorDan Dennedy <dan@dennedy.org>
Mon, 8 Feb 2010 04:36:38 +0000 (20:36 -0800)
committerDan Dennedy <dan@dennedy.org>
Mon, 8 Feb 2010 04:36:38 +0000 (20:36 -0800)
src/modules/core/filter_resize.c

index 9bf6c602d57c736e6dd3649d34131a2a03183d26..fc6cb1a3d73f9c6366c36be948cf7acc44688311 100644 (file)
@@ -292,10 +292,9 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                     mlt_properties_get_int( properties, "progressive" ) == 0 )
                {
                        // Get the input image, width and height
-                       int size;
-                       uint8_t *image = mlt_properties_get_data( properties, "image", &size );
-                       uint8_t *ptr = image + owidth * bpp;
-                       memmove( ptr, image, size - owidth * bpp );
+                       int size = owidth * oheight * bpp;
+                       uint8_t *ptr = *image + owidth * bpp;
+                       memmove( ptr, *image, size - owidth * bpp );
                        
                        // Set the normalised field order
                        mlt_properties_set_int( properties, "top_field_first", 0 );