changeset 8335:0e1d45e44813

set channel count to a saner value if the card reports an unknown audio mode
author henry
date Tue, 03 Dec 2002 13:24:10 +0000
parents 0c9a596abe39
children 071fc9e4c7ce
files libmpdemux/tvi_v4l.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/tvi_v4l.c	Tue Dec 03 02:02:58 2002 +0000
+++ b/libmpdemux/tvi_v4l.c	Tue Dec 03 13:24:10 2002 +0000
@@ -357,6 +357,11 @@
 	case VIDEO_SOUND_STEREO:
 	    priv->audio_channels[i] = 2;
 	    break;
+	default:
+	    mp_msg(MSGT_TV, MSGL_ERR, "Card reports an unknown audio mode !\n");
+	    mp_msg(MSGT_TV, MSGL_ERR, "Trying two channel audio. Use forcechan to override.\n");
+	    priv->audio_channels[i] = 2;
+	    break;
 	}
 
 	if (reqmode >= 0 && priv->audio[i].mode != reqmode) {