Fix FTBFS due to deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE in ffmpeg

master
Slávek Banko 11 years ago
parent 3c8b0ba438
commit fba7abdf83

@ -174,7 +174,7 @@ mlt_filter filter_avresample_init( char *arg )
if ( this != NULL )
{
// Calculate size of the buffer
int size = AVCODEC_MAX_AUDIO_FRAME_SIZE * sizeof( int16_t );
int size = /*AVCODEC_MAX_AUDIO_FRAME_SIZE*/ 192000 * sizeof( int16_t );
// Allocate the buffer
int16_t *buffer = mlt_pool_alloc( size );

@ -838,7 +838,7 @@ static int producer_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form
if ( audio_buffer == NULL )
{
// Allocate the audio buffer
audio_buffer = mlt_pool_alloc( AVCODEC_MAX_AUDIO_FRAME_SIZE * sizeof( int16_t ) );
audio_buffer = mlt_pool_alloc( /*AVCODEC_MAX_AUDIO_FRAME_SIZE*/ 192000 * sizeof( int16_t ) );
// And store it on properties for reuse
mlt_properties_set_data( properties, "audio_buffer", audio_buffer, 0, ( mlt_destructor )mlt_pool_release, NULL );
@ -873,7 +873,7 @@ static int producer_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form
{
int ret = 0;
int got_audio = 0;
int16_t *temp = av_malloc( sizeof( int16_t ) * AVCODEC_MAX_AUDIO_FRAME_SIZE );
int16_t *temp = av_malloc( sizeof( int16_t ) * /*AVCODEC_MAX_AUDIO_FRAME_SIZE*/ 192000 );
av_init_packet( &pkt );
@ -895,7 +895,7 @@ static int producer_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form
// We only deal with audio from the selected audio_index
while ( ptr != NULL && ret >= 0 && pkt.stream_index == index && len > 0 )
{
int data_size = sizeof( int16_t ) * AVCODEC_MAX_AUDIO_FRAME_SIZE;
int data_size = sizeof( int16_t ) * /*AVCODEC_MAX_AUDIO_FRAME_SIZE*/ 192000;
// Decode the audio
#if (LIBAVCODEC_VERSION_INT >= ((51<<16)+(29<<8)+0))

Loading…
Cancel
Save