From 359975f5aeaf650474e422fa044dfeb986870acd Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Mon, 10 Feb 2003 17:43:21 +0000 Subject: [PATCH] * modules/audio_output/alsa.c: Fixed mono files output (thanks bozo !), * Minor fixes. --- modules/audio_output/alsa.c | 13 +++++++++++-- modules/audio_output/oss.c | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c index 8d4c78ff48..79adf8ed2e 100644 --- a/modules/audio_output/alsa.c +++ b/modules/audio_output/alsa.c @@ -2,7 +2,7 @@ * alsa.c : alsa plugin for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: alsa.c,v 1.21 2003/02/03 00:39:42 sam Exp $ + * $Id: alsa.c,v 1.22 2003/02/10 17:43:21 massiot Exp $ * * Authors: Henri Fallon - Original Author * Jeffrey Baker - Port to ALSA 1.0 API @@ -159,7 +159,7 @@ static void Probe( aout_instance_t * p_aout, i_channels = aout_FormatNbChannels( &p_aout->output.output ); - while ( i_channels > 1 ) + while ( i_channels > 0 ) { /* Here we have to probe multi-channel capabilities but I have no idea (at the moment) of how its managed by the ALSA @@ -342,6 +342,15 @@ static int Open( vlc_object_t *p_this ) p_aout->output.output.i_physical_channels = AOUT_CHAN_CENTER; } + else + { + /* This should not happen ! */ + msg_Err( p_aout, "internal: can't find audio-device (%s)", + val.psz_string ); + free( p_sys ); + free( val.psz_string ); + return VLC_EGENERIC; + } free( val.psz_string ); #ifdef DEBUG diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c index 1fff18229f..8d7005e974 100644 --- a/modules/audio_output/oss.c +++ b/modules/audio_output/oss.c @@ -2,7 +2,7 @@ * oss.c : OSS /dev/dsp module for vlc ***************************************************************************** * Copyright (C) 2000-2002 VideoLAN - * $Id: oss.c,v 1.50 2003/02/06 15:14:41 massiot Exp $ + * $Id: oss.c,v 1.51 2003/02/10 17:43:21 massiot Exp $ * * Authors: Michel Kaempf * Samuel Hocevar @@ -331,6 +331,7 @@ static int Open( vlc_object_t *p_this ) msg_Err( p_aout, "internal: can't find audio-device (%s)", val.psz_string ); free( p_sys ); + free( val.psz_string ); return VLC_EGENERIC; } free( val.psz_string ); -- 2.39.2