[MPlayer-dev-eng] [PATCH] fix inconsistencies in libvo/geometry.c
Benson Mitchell
benson.mitchell at gmail.com
Fri Jun 26 14:34:21 CEST 2009
On Fri, Jun 26, 2009 at 7:17 AM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de>wrote:
> On Fri, Jun 26, 2009 at 06:01:38AM -0400, Benson Mitchell wrote:
> > In geometry.c, -1 and INT_MIN were used alternately for unspecified
> values
> > of the same variables; it appears some partial conversion was in
> progress,
> > but never finished.
>
> No, anything < 0 is used for width/height because width < 0 is not
> valid. There is a good chance that with your change you end up with
> MPlayer trying to create a window with size < 0 and the crashing or
> doing something else that makes no sense.
> INT_MIN is used for the offsets because negative values make perfect
> sense for those, though INT_MIN has a reasonable chance that nobody will
> actually want to use it.
That makes sense. Here's a patch that leaves the tests alone, and just sets
the values to INT_MIN always; since INT_MIN is <0, it works for both tests.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geometry.diff
Type: application/octet-stream
Size: 552 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090626/7a0f769e/attachment.obj>
More information about the MPlayer-dev-eng
mailing list