X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_frame.c;h=0924cbbc780e9e0ee155c2c90cd0bc33885aa98b;hb=e253fb0e1e231bcdc77bc37b05c7a9724dbe2bb1;hp=1f2f3d216bc4b83a9d48b89c75f0eb96c49b2ab6;hpb=52b7a4fb7a6e8745ac40153cd18c1fb5555a82f2;p=melted diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index 1f2f3d2..0924cbb 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -88,7 +88,7 @@ mlt_properties mlt_frame_properties( mlt_frame this ) int mlt_frame_is_test_card( mlt_frame this ) { - return mlt_properties_get_int( mlt_frame_properties( this ), "test_image" ); + return mlt_deque_count( this->stack_image ) == 0 || mlt_properties_get_int( mlt_frame_properties( this ), "test_image" ); } /** Check if we have a way to derive something than test audio. @@ -245,6 +245,7 @@ int mlt_frame_get_image( mlt_frame this, uint8_t **buffer, mlt_image_format *for mlt_properties_set_int( properties, "width", *width ); mlt_properties_set_int( properties, "height", *height ); + mlt_properties_set_int( properties, "aspect_ratio", 1 ); switch( *format ) { @@ -493,6 +494,8 @@ void mlt_resize_yuv422( uint8_t *output, int owidth, int oheight, uint8_t *input int active_width = 2 * iwidth; int inactive_width = out_x_range - in_x_range; + uint8_t *p = NULL; + uint8_t *end = NULL; // Loop for the entirety of our output height. while ( iheight -- ) @@ -509,8 +512,13 @@ void mlt_resize_yuv422( uint8_t *output, int owidth, int oheight, uint8_t *input } // We're in the input range for this row. - memcpy( out_ptr, in_middle + in_line, active_width ); - out_ptr += active_width; + p = in_middle + in_line; + end = out_ptr + active_width; + while ( out_ptr != end ) + { + *out_ptr ++ = *p ++; + *out_ptr ++ = *p ++; + } // Fill the outer part with black elements = inactive_width;