changeset 7844:ba459e95d27a

minor fixes in forceaudio option
author henry
date Tue, 22 Oct 2002 15:33:41 +0000
parents ef4046febd24
children 86420d5d7283
files libmpdemux/tvi_v4l.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/tvi_v4l.c	Tue Oct 22 15:14:30 2002 +0000
+++ b/libmpdemux/tvi_v4l.c	Tue Oct 22 15:33:41 2002 +0000
@@ -515,7 +515,15 @@
 	else
 	    priv->audio_id = 0;
 	audio_in_set_samplerate(&priv->audio_in, 44100);
-	audio_in_set_channels(&priv->audio_in, priv->audio_channels[priv->audio_id]);
+	if (priv->capability.audios) {
+	    audio_in_set_channels(&priv->audio_in, priv->audio_channels[priv->audio_id]);
+	} else {
+	    if (tv_param_forcechan >= 0) {
+		audio_in_set_channels(&priv->audio_in, tv_param_forcechan);
+	    } else {
+		audio_in_set_channels(&priv->audio_in, 2);
+	    }
+	}
 	if (audio_in_setup(&priv->audio_in) < 0) return 0;
 	setup_audio_buffer_sizes(priv);
     }