From da0aacd8607ab39169fc28fc8e2e4a3d71417739 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 23 Jun 2002 17:28:44 +0000 Subject: [PATCH] tv audio fixing patch by Paul Ortyl git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6530 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/tvi_v4l.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libmpdemux/tvi_v4l.c b/libmpdemux/tvi_v4l.c index 403e01dc35..79ea4f5da4 100644 --- a/libmpdemux/tvi_v4l.c +++ b/libmpdemux/tvi_v4l.c @@ -637,6 +637,9 @@ static int control(priv_t *priv, int cmd, void *arg) 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 @@ static int control(priv_t *priv, int cmd, void *arg) } 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*