[vlc-devel] [PATCH] Allow for newer a52_init(void) call.
Kelly Anderson
kelly at silka.with-linux.com
Sun Jan 8 05:27:27 CET 2012
On 01/07/2012 09:22 PM, Rafaël Carré wrote:
> Le 2012-01-07 23:08, Kelly Anderson a écrit :
>> This fixes compile with svn://svn.videolan.org/liba52/trunk.
> http://svn.videolan.org/comp.php?repname=liba52&compare[]=/@593&compare[]=/@597
> shows that new defines were added when it changed.
>
> Should be simpler to do just e.g. #ifdef A52_ACCEL_DETECT in a52tofloat32.c
True. I haven't looked at the a52 code for a long time, so I forgot the
declaration changes.
I'll redo the patch.
>
>> ---
>> configure.ac | 21 +++++++++++++++++++++
>> modules/audio_filter/converter/a52tofloat32.c | 6 +++++-
>> 2 files changed, 26 insertions(+), 1 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index fec1f3c..65e20ad 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -2703,6 +2703,27 @@ AC_ARG_WITH(a52-fixed,
>> [
>> VLC_ADD_CPPFLAGS([a52tofloat32],[-DLIBA52_FIXED]) ])
>>
>> +AC_COMPILE_IFELSE([
>> +#ifdef HAVE_STDINT_H
>> +#include<stdint.h>
>> +#else
>> +#include<inttypes.h>
>> +#endif
>> +#ifdef HAVE_A52DEC_A52_H
>> +#include<a52dec/a52.h>
>> +#else
>> +#include<a52.h>
>> +#endif
>> +
>> +int
>> +main ()
>> +{
>> + a52_init();
>> + return 0;
>> +}
>> +], AC_DEFINE(A52_INIT_VOID, 1, [Define if a52_init accepts void.]),)
>> +
>> +
>> dnl
>> dnl DTS Coherent Acoustics decoder plugin
>> dnl
>> diff --git a/modules/audio_filter/converter/a52tofloat32.c b/modules/audio_filter/converter/a52tofloat32.c
>> index 2980dd8..dd0322c 100644
>> --- a/modules/audio_filter/converter/a52tofloat32.c
>> +++ b/modules/audio_filter/converter/a52tofloat32.c
>> @@ -205,7 +205,11 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
>> p_sys->i_flags |= A52_ADJUST_LEVEL;
>>
>> /* Initialize liba52 */
>> - p_sys->p_liba52 = a52_init( 0 );
>> +#ifdef A52_INIT_VOID
>> + p_sys->p_liba52 = a52_init();
>> +#else
>> + p_sys->p_liba52 = a52_init(0);
>> +#endif
>> if( p_sys->p_liba52 == NULL )
>> {
>> msg_Err( p_this, "unable to initialize liba52" );
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list