some temporary fixes
[melted] / mlt / src / framework / mlt_frame.c
index cb26ee9..1c36cf0 100644 (file)
@@ -77,7 +77,15 @@ mlt_properties mlt_frame_properties( mlt_frame this )
 
 int mlt_frame_is_test_card( mlt_frame this )
 {
-       return this->stack_get_image_size == 0;
+       return ( this->stack_get_image_size == 0 && mlt_properties_get_data( mlt_frame_properties( this ), "image", NULL ) == NULL );
+}
+
+/** Check if we have a way to derive something than test audio.
+*/
+
+int mlt_frame_is_test_audio( mlt_frame this )
+{
+       return this->get_audio == NULL;
 }
 
 /** Get the aspect ratio of the frame.
@@ -491,8 +499,23 @@ int mlt_frame_composite_yuv( mlt_frame this, mlt_frame that, int x, int y, float
 void *memfill( void *dst, void *src, int l, int elements )
 {
        int i = 0;
-       for ( i = 0; i < elements; i ++ )
-               dst = memcpy( dst, src, l ) + l;
+       if ( l == 2 )
+       {
+               uint8_t *p = dst;
+               uint8_t *src1 = src;
+               uint8_t *src2 = src + 1;
+               for ( i = 0; i < elements; i ++ )
+               {
+                       *p ++ = *src1;
+                       *p ++ = *src2;
+               }
+               dst = p;
+       }
+       else
+       {
+               for ( i = 0; i < elements; i ++ )
+                       dst = memcpy( dst, src, l ) + l;
+       }
        return dst;
 }