From 7a1020aea9d963d06fd0cc8cbb0238ecf2ba9353 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <rem@videolan.org>
Date: Wed, 5 Sep 2007 17:04:14 +0000
Subject: [PATCH] Fix old ffmpeg linking regression from [20357]

---
 modules/codec/ffmpeg/audio.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/codec/ffmpeg/audio.c b/modules/codec/ffmpeg/audio.c
index 175b7e20b3df..37e72c73a287 100644
--- a/modules/codec/ffmpeg/audio.c
+++ b/modules/codec/ffmpeg/audio.c
@@ -253,10 +253,16 @@ aout_buffer_t *E_( DecodeAudio )( decoder_t *p_dec, block_t **pp_block )
     p_block->i_buffer -= FF_INPUT_BUFFER_PADDING_SIZE;
     memset( &p_block->p_buffer[p_block->i_buffer], 0, FF_INPUT_BUFFER_PADDING_SIZE );
 
+#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(0<<8)+0)
     i_output = __MAX( AVCODEC_MAX_AUDIO_FRAME_SIZE, p_block->i_buffer );
     i_used = avcodec_decode_audio2( p_sys->p_context,
                                    (int16_t*)p_sys->p_output, &i_output,
                                    p_block->p_buffer, p_block->i_buffer );
+#else
+    i_used = avcodec_decode_audio( p_sys->p_context,
+                                   (int16_t*)p_sys->p_output, &i_output,
+                                   p_block->p_buffer, p_block->i_buffer );
+#endif
 
     if( i_used < 0 || i_output < 0 )
     {
-- 
GitLab