From 4e9d790036c394aee8fb72918975d0d6b854dfb6 Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Tue, 22 Oct 2002 23:08:00 +0000 Subject: [PATCH] * Added -mdynamic-no-pic to darwin CFLAGS (can you believe I actually read ./ :) * Miscellaneous small fixes. --- configure.ac.in | 9 +++++++++ include/aout_internal.h | 6 +++--- modules/audio_filter/converter/a52tofloat32.c | 7 ++++++- src/audio_output/common.c | 8 ++++---- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 074d9541cc..f370769c66 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -468,6 +468,15 @@ if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then CFLAGS_i420_yuy2_mmx="${CFLAGS_i420_yuy2_mmx} -fomit-frame-pointer" fi +dnl Check for -mdynamic-no-pic +AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic], + [ac_cv_c_dynamic_no_pic], + [CFLAGS="${CFLAGS_save} -mdynamic-no-pic" + AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)]) +if test "x${ac_cv_c_dynamic_no_pic}" != "xno"; then + CFLAGS_OPTIM="${CFLAGS_OPTIM} -mdynamic-no-pic" +fi + dnl Check for Darwin plugin linking flags AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic], [ac_cv_ld_darwin], diff --git a/include/aout_internal.h b/include/aout_internal.h index b758cfa861..7bd93ab6c5 100644 --- a/include/aout_internal.h +++ b/include/aout_internal.h @@ -2,7 +2,7 @@ * aout_internal.h : internal defines for audio output ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: aout_internal.h,v 1.24 2002/10/21 20:00:09 massiot Exp $ + * $Id: aout_internal.h,v 1.25 2002/10/22 23:08:00 massiot Exp $ * * Authors: Christophe Massiot * @@ -263,8 +263,8 @@ VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t /* From common.c : */ VLC_EXPORT( int, aout_FormatNbChannels, ( audio_sample_format_t * p_format ) ); void aout_FormatPrepare( audio_sample_format_t * p_format ); -VLC_EXPORT( void, aout_FormatPrint, ( aout_instance_t * p_aout, const char * psz_text, audio_sample_format_t * p_format ) ); -VLC_EXPORT( void, aout_FormatsPrint, ( aout_instance_t * p_aout, const char * psz_text, audio_sample_format_t * p_format1, audio_sample_format_t * p_format2 ) ); +VLC_EXPORT( void, aout_FormatPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format ) ); +VLC_EXPORT( void, aout_FormatsPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format1, const audio_sample_format_t * p_format2 ) ); void aout_FifoInit( aout_instance_t *, aout_fifo_t *, u32 ); mtime_t aout_FifoNextStart( aout_instance_t *, aout_fifo_t * ); void aout_FifoPush( aout_instance_t *, aout_fifo_t *, aout_buffer_t * ); diff --git a/modules/audio_filter/converter/a52tofloat32.c b/modules/audio_filter/converter/a52tofloat32.c index dbdacde84c..96e67a70b1 100644 --- a/modules/audio_filter/converter/a52tofloat32.c +++ b/modules/audio_filter/converter/a52tofloat32.c @@ -4,7 +4,7 @@ * (http://liba52.sf.net/). ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: a52tofloat32.c,v 1.4 2002/10/20 12:23:47 massiot Exp $ + * $Id: a52tofloat32.c,v 1.5 2002/10/22 23:08:00 massiot Exp $ * * Authors: Gildas Bazin * Christophe Massiot @@ -196,7 +196,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, "liba52 couldn't do the requested downmix 0x%x->0x%x", p_sys->i_flags & A52_CHANNEL_MASK, i_flags & A52_CHANNEL_MASK ); + + /* We do not know if the output has the same number of channels + * than the input, so die quietly... */ memset( p_out_buf->p_buffer, 0, i_bytes_per_block * 6 ); + p_out_buf->i_nb_samples = p_in_buf->i_nb_samples; + p_out_buf->i_nb_bytes = i_bytes_per_block * 6; return; } diff --git a/src/audio_output/common.c b/src/audio_output/common.c index 58838f3304..0c1ccb2bd4 100644 --- a/src/audio_output/common.c +++ b/src/audio_output/common.c @@ -2,7 +2,7 @@ * common.c : audio output management of common data structures ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: common.c,v 1.4 2002/10/21 20:00:10 massiot Exp $ + * $Id: common.c,v 1.5 2002/10/22 23:08:00 massiot Exp $ * * Authors: Christophe Massiot * @@ -205,7 +205,7 @@ static const char * FormatPrintChannels( int i_channels ) * aout_FormatPrint : print a format in a human-readable form *****************************************************************************/ void aout_FormatPrint( aout_instance_t * p_aout, const char * psz_text, - audio_sample_format_t * p_format ) + const audio_sample_format_t * p_format ) { msg_Dbg( p_aout, "%s format='%4.4s' rate=%d channels=%s", psz_text, (char *)&p_format->i_format, p_format->i_rate, @@ -216,8 +216,8 @@ void aout_FormatPrint( aout_instance_t * p_aout, const char * psz_text, * aout_FormatsPrint : print two formats in a human-readable form *****************************************************************************/ void aout_FormatsPrint( aout_instance_t * p_aout, const char * psz_text, - audio_sample_format_t * p_format1, - audio_sample_format_t * p_format2 ) + const audio_sample_format_t * p_format1, + const audio_sample_format_t * p_format2 ) { msg_Dbg( p_aout, "%s format='%4.4s'->'%4.4s' rate=%d->%d channels=%s->%s", psz_text,