[MPlayer-dev-eng] tv input problems and partial solutions

Alex Beregszaszi alex at naxine.org
Sun Jun 23 19:17:37 CEST 2002


Hi,

> What does mencoder need from input stream to get proper A-V sync???
> Maybe some timestamps???
it uses timestamps now

> ===================================================================
> diff -ur main.orig/libmpdemux/tvi_v4l.c main/libmpdemux/tvi_v4l.c
> --- main.orig/libmpdemux/tvi_v4l.c      Wed Jun  5 03:49:03 2002
> +++ main/libmpdemux/tvi_v4l.c   Sun Jun 23 18:11:21 2002
> @@ -637,7 +637,10 @@
>             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] =
> =====================================================================

thx for this patch, applied it

-
alex



More information about the MPlayer-dev-eng mailing list