X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fvorbis%2Fproducer_vorbis.c;h=35fd3a2c09b1ec996741406211daa30b408c550a;hb=f2dda0fcd1c242afcd07f2c2ef98f8f6b3fb0e13;hp=9d3b849cf0a8c0fd369759f6c4f86b9430ad0f18;hpb=e119b618924284bb2bcc7c2199ab06066ed76c8e;p=melted diff --git a/src/modules/vorbis/producer_vorbis.c b/src/modules/vorbis/producer_vorbis.c index 9d3b849..35fd3a2 100644 --- a/src/modules/vorbis/producer_vorbis.c +++ b/src/modules/vorbis/producer_vorbis.c @@ -204,10 +204,10 @@ static int producer_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form if ( audio_buffer == NULL ) { // Allocate the audio buffer - audio_buffer = malloc( 131072 * sizeof( int16_t ) ); + audio_buffer = mlt_pool_alloc( 131072 * sizeof( int16_t ) ); // And store it on properties for reuse - mlt_properties_set_data( properties, "audio_buffer", audio_buffer, 0, free, NULL ); + mlt_properties_set_data( properties, "audio_buffer", audio_buffer, 0, mlt_pool_release, NULL ); } // Seek if necessary @@ -270,11 +270,11 @@ static int producer_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form // Now handle the audio if we have enough if ( audio_used >= *samples ) { - *buffer = malloc( *samples * *channels * sizeof( int16_t ) ); + *buffer = mlt_pool_alloc( *samples * *channels * sizeof( int16_t ) ); memcpy( *buffer, audio_buffer, *samples * *channels * sizeof( int16_t ) ); audio_used -= *samples; memmove( audio_buffer, &audio_buffer[ *samples * *channels ], audio_used * *channels * sizeof( int16_t ) ); - mlt_properties_set_data( frame_properties, "audio", *buffer, 0, free, NULL ); + mlt_properties_set_data( frame_properties, "audio", *buffer, 0, mlt_pool_release, NULL ); } else {