ports/59946: [fix] multimedia/mplayer: bktr input not working on some cards

Simun Mikecin sime at logos.hr
Thu Dec 4 12:00:40 UTC 2003


>Number:         59946
>Category:       ports
>Synopsis:       [fix] multimedia/mplayer: bktr input not working on some cards
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 04 04:00:36 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Simun Mikecin
>Release:        FreeBSD 5.2-BETA i386
>Organization:
>Environment:
System: FreeBSD mail.logos.hr 5.2-BETA FreeBSD 5.2-BETA #0: Wed Nov 29 13:36:42 CEST 2003 root at mail.logos.hr:/usr/obj/usr/src/sys/MAIL i386


	
>Description:
	Version 0.92 of mplayer uses float type variable as an argument to
	METEORSFPS ioctl (which sets the frame rate).  But that ioctl
	actually expects u_short. This causes (at least on some cards, for
	example PAL/BGDHI version of Hauppage WinTV) that frames are not
	updated as they should: mplayer/mencoder only receives one frame. 
	There is already a pr/58531 that addresses this problem. I have
	already sent this fix there, but it seems commiters are more
	attracted to "update" class than to "sw-bug" class.

>How-To-Repeat:
	Try mplayer/mencoder with bktr input on PAL/BGDHI Hauppage WinTV.

>Fix:
	Thisi is a replacement file for
	multimedia/mplayer/files/patch-demux-tvi_bsdbt848.c
	Don't use it as a patch to that file!

--- multimedia/mplayer/files/patch-demux-tvi_bsdbt848.c.orig      Thu Nov 27 22:53:13 2003
+++ multimedia/mplayer/files/patch-demux-tvi_bsdbt848.c   Thu Nov 27 23:03:05 2003
@@ -287,6 +287,7 @@

     case TVI_CONTROL_TUN_SET_NORM:
         {
+        u_short tmp_fps;
         int req_mode = (int)*(void **)arg;

         priv->iformat = METEOR_FMT_AUTOMODE;
@@ -352,11 +353,18 @@
             return(0);
             }

-        if(ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0)
+        tmp_fps=priv->fps;
+        if(ioctl(priv->btfd, METEORSFPS, &tmp_fps) < 0)
             {
             perror("fps:ioctl");
             return(0);
             }
+       //set audioid after norm has been set
+       if(priv->tunerready == TRUE &&
+           ioctl(priv->tunerfd,BT848_SAUDIO, &tv_param_audio_id)<0)
+           {
+               perror("Unable to set audioid");
+           }

         return(TVI_CONTROL_TRUE);
         }
@@ -453,6 +461,7 @@
 {
 int marg;
 int count;
+u_short tmp_fps;

 G_private = priv; /* Oooh, sick */

@@ -497,8 +506,9 @@
     perror("SINPUT:ioctl");
     }

+tmp_fps=priv->fps;
 if(priv->videoready == TRUE &&
-   ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0)
+   ioctl(priv->btfd, METEORSFPS, &tmp_fps) < 0)
     {
     perror("SFPS:ioctl");
     }
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list