mlt_producer producer_ppm_init( mlt_profile profile, mlt_service_type type, const char *id, char *command )
{
- producer_ppm this = calloc( sizeof( struct producer_ppm_s ), 1 );
+ producer_ppm this = calloc( 1, sizeof( struct producer_ppm_s ) );
if ( this != NULL && mlt_producer_init( &this->parent, this ) == 0 )
{
mlt_producer producer = &this->parent;
// Read it
if ( pipe != NULL )
- fread( *buffer, size, 1, pipe );
+ size = fread( *buffer, size, 1, pipe );
else
memset( *buffer, 0, size );
// Pass the data on the frame properties
- mlt_properties_set_data( properties, "audio", *buffer, size, free, NULL );
+ mlt_frame_set_audio( this, *buffer, *format, size, free );
return 0;
}
int count = 0;
{
char temp[ 132 ];
- fgets( temp, 132, video );
- fgets( temp, 132, video );
+ char *ignore = fgets( temp, 132, video );
+ ignore = fgets( temp, 132, video );
count += sscanf( temp, "%d %d", width, height );
- fgets( temp, 132, video );
+ ignore = fgets( temp, 132, video );
}
return count;
}
uint8_t *image = mlt_pool_alloc( width * ( height + 1 ) * 3 );
// Read it
- fread( image, width * height * 3, 1, video );
+ size_t ignore;
+ ignore = fread( image, width * height * 3, 1, video );
// Pass the data on the frame properties
mlt_frame_set_image( *frame, image, width * ( height + 1 ) * 3, mlt_pool_release );