*channels = 2;
if ( *frequency <= 0 )
*frequency = 48000;
- if ( test_card.afmt != *format )
+ if ( test_card.audio == NULL || test_card.afmt != *format )
{
test_card.afmt = *format;
test_card.audio = realloc( test_card.audio, *samples * *channels * sizeof( int16_t ) );
int mlt_frame_composite_yuv( mlt_frame this, mlt_frame that, int x, int y, float weight )
{
int ret = 0;
- int width_src, height_src;
- int width_dest, height_dest;
- mlt_image_format format_src, format_dest;
+ int width_src = 0, height_src = 0;
+ int width_dest = 0, height_dest = 0;
+ mlt_image_format format_src = mlt_image_yuv422, format_dest = mlt_image_yuv422;
uint8_t *p_src, *p_dest;
int i, j;
int stride_src;
//fprintf( stderr, "call get_image on frame a\n"), fflush( stderr );
mlt_frame_get_image( this, &p_dest, &format_dest, &width_dest, &height_dest, 1 /* writable */ );
//fprintf( stderr, "call get_image on frame b\n"), fflush( stderr );
- mlt_frame_get_image( that, &p_src, &format_src, &width_src, &height_src, 1 /* writable */ );
+ mlt_frame_get_image( that, &p_src, &format_src, &width_src, &height_src, 0 /* writable */ );
//fprintf( stderr, "mlt_frame_composite_yuv %dx%d -> %dx%d\n", width_src, height_src, width_dest, height_dest );
//fflush(stderr);
int ret = 0;
int16_t *p_src, *p_dest;
int16_t *src, *dest;
- static int16_t *extra_src = NULL, *extra_dest = NULL;
+ //static int16_t *extra_src = NULL, *extra_dest = NULL;
static int extra_src_samples = 0, extra_dest_samples = 0;
int frequency_src = 0, frequency_dest = 0;
int channels_src = 0, channels_dest = 0;