]> git.sesse.net Git - mlt/commitdiff
filter_resize.c: fix field order correction
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 9 May 2008 22:30:06 +0000 (22:30 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 9 May 2008 22:30:06 +0000 (22:30 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1122 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/core/filter_resize.c

index cb9c61b5d047aa62af3662a312d1736fef6cb00f..e7e7fbe2ec3c44c4ecc3de70ad5ad109a5a1cca9 100644 (file)
@@ -136,22 +136,8 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                        int size;
                        uint8_t *image = mlt_properties_get_data( properties, "image", &size );
                        uint8_t *ptr = image + owidth * 2;
-                       int h = oheight / 2;
-                       int w = owidth;
-
-                       // Swap the lines around
-                       while( h -- )
-                       {
-                               w = owidth;
-                               while( w -- )
-                               {
-                                       swap_bytes( image ++, ptr ++ );
-                                       swap_bytes( image ++, ptr ++ );
-                               }
-                               image += owidth * 2;
-                               ptr += owidth * 2;
-                       }
-
+                       memmove( ptr, image, size - owidth * 2 );
+                       
                        // Set the normalised field order
                        mlt_properties_set_int( properties, "top_field_first", 0 );
                        mlt_properties_set_int( properties, "meta.top_field_first", 0 );