static void luma_read_pgm( FILE *f, float **map, int *width, int *height )
{
- void *release = NULL;
uint8_t *data = NULL;
while (1)
{
bpp = maxval > 255 ? 2 : 1;
// allocate temporary storage for the raw data
- data = mlt_pool_allocate( *width * *height * bpp, &release );
+ data = mlt_pool_alloc( *width * *height * bpp );
if ( data == NULL )
break;
break;
// allocate the luma bitmap
- // IRRIGATE ME
- // Difficult here - need to change the function prototype....
- *map = p = (float*) malloc( *width * *height * sizeof( float ) );
+ *map = p = (float*)mlt_pool_alloc( *width * *height * sizeof( float ) );
if ( *map == NULL )
break;
break;
}
- if ( release != NULL )
- mlt_pool_release( release );
+ if ( data != NULL )
+ mlt_pool_release( data );
}
pipe = fopen( luma_file, "r" );
if ( pipe != NULL )
{
- free( this->bitmap );
+ mlt_pool_release( this->bitmap );
luma_read_pgm( pipe, &this->bitmap, &this->width, &this->height );
fclose( pipe );
}
static void transition_close( mlt_transition parent )
{
transition_luma *this = (transition_luma*) parent->child;
- free( this->bitmap );
+ mlt_pool_release( this->bitmap );
free( this->filename );
free( this );
}