From owner-freebsd-current@FreeBSD.ORG Sun Jun 8 15:37:29 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A0A837B401; Sun, 8 Jun 2003 15:37:29 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70BAC43F75; Sun, 8 Jun 2003 15:37:28 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h58Ma7On059250; Sun, 8 Jun 2003 18:36:07 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h58Ma70T059247; Sun, 8 Jun 2003 18:36:07 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sun, 8 Jun 2003 18:36:07 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Arjan van Leeuwen In-Reply-To: <200306082329.31546.avleeuwen@piwebs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: ports@freebsd.org cc: freebsd-current@freebsd.org cc: Ted Lindgreen cc: lioux@freebsd.org Subject: Re: Re Regression: Playing QT files from mplayer stopped working in 5.1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2003 22:37:29 -0000 On Sun, 8 Jun 2003, Arjan van Leeuwen wrote: > Indeed, a very dirty but effective fix. Thank you. I'll forward this to > ports@ and lioux@, who has done all the recent updates on mplayer. So one interesting question would be: if you ktrace on both 4.x and 5.x, do both pass in the bad value to close(), or is there something else in 5.x triggering the use of negative file descriptor numbers? > > Arjan > > On Sunday 08 June 2003 15:06, Ted Lindgreen wrote: > > > Since a short time (don't know exactly when it happened) it's not > > > possible anymore to play Quicktime files (.mov) with mplayer on > > > 5.1-CURRENT. It has to be a change in -CURRENT, I haven't updated > > > mplayer. > > > > I do not have the right fix, but the cause of the problem is > > that in loader/win32.c at line 2077: > > > > 2076 if (v1 > 2) > > 2077 if (!close(v1a)) > > > > close is called with a ridiciously large value. In previous > > FreeBSD releases this appearently did not cause a fatal problem, > > but since a week or so mplayer aborts on it. > > > > A stupid, but effective workaround is not to call close if v1 > > is too large, f.i.: > > > > 2072 static int WINAPI expCloseHandle(long v1) > > 2073 { > > 2074 dbgprintf("CloseHandle(0x%x) => 1\n", v1); > > 2075 /* do not close stdin,stdout and stderr */ > > 2076 if (v1 > 2 && v1 < 128) > > 2077 if (!close(v1)) > > 2078 return 0; > > 2079 return 1; > > 2080 } > > > > Of course for the real fix one needs to delve deeper into mplayer > > to find out where the large valued filedescriptor comes from. > > > > -- ted > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >