[MPlayer-dev-eng] Bugzilla (1412) patch for negative WinID under Windows

David Bolen db3l.net at gmail.com
Mon Mar 2 22:50:54 CET 2009


Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:

> Patch submissions belong here. Bugzilla is a good place to store
> long-term requests, but often nobody has time to explicitly check it.

Thanks - I'll use the list in the future.  And I appreciate your
taking a look.

> I prefer to reserve negative numbers for future uses, thus your patch
> seems inappropriate (also it only works out of the "luck" that Windows
> defined -1 as the invalid handle value, so your fix might still leave
> issues on other systems).

I only selected -1 due to mplayer using it as the default value for
WinID, and with the vo_directx driver as a model, which already
explicitly checks for -1.

The only cross-system part of the patch is the one line in vo_gl, and
since it was previously checking for WinID >= 0, a WinID of -1 could
never have worked on other systems prior to this anyway, so I'm not
sure what issues might exist for other systems post-patch.

> Instead I made -wid take a 64 bit integer (though that means you'll have
> to remove the negative number hack from your frontend again...).

Fair enough.  While I probably would have preferred a patch that would
fix the other drivers with no impact to existing code (there may front
ends other than mine currently generating signed command line wid
values), in the end it still provides a way to work with all drivers.

-- David




More information about the MPlayer-dev-eng mailing list