]> git.sesse.net Git - mlt/blobdiff - src/modules/core/filter_mirror.c
Mutable properties
[mlt] / src / modules / core / filter_mirror.c
index e007ac2a06818758c152b3a0e97ece1afafe5eb9..66b88720ac43aeed4773c6ea3b2fa0eaba7247d0 100644 (file)
@@ -63,7 +63,7 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                                q = p + *width * 2;
                                if ( !reverse )
                                {
-                                       while ( p != q )
+                                       while ( p < q )
                                        {
                                                *p ++ = *( q - 2 );
                                                *p ++ = *( q - 3 );
@@ -74,7 +74,7 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                                }
                                else
                                {
-                                       while ( p != q )
+                                       while ( p < q )
                                        {
                                                *( q - 2 ) = *p ++;
                                                *( q - 3 ) = *p ++;
@@ -95,7 +95,7 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                        for ( i = 0; i < hh; i ++ )
                        {
                                p = ( uint16_t * )*image + i * *width;
-                               q = end - i * *width;
+                               q = end - ( i + 1 ) * *width;
                                j = *width;
                                if ( !reverse )
                                {
@@ -191,7 +191,7 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                        {
                                p = ( uint8_t * )*image + i * *width * 2;
                                q = p + *width * 2;
-                               while ( p != q )
+                               while ( p < q )
                                {
                                        t[ 0 ] = p[ 0 ];
                                        t[ 1 ] = p[ 1 ];
@@ -219,7 +219,7 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                        for ( i = 0; i < hh; i ++ )
                        {
                                p = ( uint16_t * )*image + i * *width;
-                               q = end - i * *width;
+                               q = end - ( i + 1 ) * *width;
                                j = *width;
                                while ( j -- )
                                {