changeset 6529:8552767dbb46

tv audio fixing patch by Paul Ortyl <ortylp at 3miasto.net>
author alex
date Sun, 23 Jun 2002 17:28:44 +0000
parents 135186c04f5a
children f8d544dd22e9
files libmpdemux/tvi_v4l.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/tvi_v4l.c	Sun Jun 23 16:04:44 2002 +0000
+++ b/libmpdemux/tvi_v4l.c	Sun Jun 23 17:28:44 2002 +0000
@@ -637,6 +637,9 @@
 	    priv->picture.contrast = (int)*(void **)arg;
 	    control(priv, TVI_CONTROL_VID_SET_PICTURE, 0);
 	    return(TVI_CONTROL_TRUE);
+	case TVI_CONTROL_VID_GET_FPS:
+	    (int)*(void **)arg=priv->fps;
+	    return(TVI_CONTROL_TRUE);
 
 	/* ========== TUNER controls =========== */
 	case TVI_CONTROL_TUN_GET_FREQ:
@@ -743,10 +746,9 @@
 	}
 	case TVI_CONTROL_AUD_SET_SAMPLERATE:
 	{
-	    priv->audio_samplerate[priv->audio_id] = (int)*(void **)arg;
+	    int tmp = priv->audio_samplerate[priv->audio_id] = (int)*(void **)arg;
 	    
-	    if (ioctl(priv->audio_fd, SNDCTL_DSP_SPEED,
-		&priv->audio_samplerate[priv->audio_id]) == -1)
+	    if (ioctl(priv->audio_fd, SNDCTL_DSP_SPEED, &tmp) == -1)
 		return(TVI_CONTROL_FALSE);
 	    priv->audio_samplesize[priv->audio_id] =
 		priv->audio_samplerate[priv->audio_id]/8/priv->fps*