Fixes intro video playback in multiple games (e.g. Earth 2150).
From: Anton Baskanov baskanov@gmail.com
Fixes intro video playback in multiple games (e.g. Earth 2150). --- dlls/winegstreamer/quartz_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index 590ef48fef4..de62187cd7d 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -286,7 +286,7 @@ unsigned int wg_format_get_max_size(const struct wg_format *format) { case WG_MAJOR_TYPE_VIDEO: { - unsigned int width = format->u.video.width, height = format->u.video.height; + unsigned int width = format->u.video.width, height = abs(format->u.video.height);
switch (format->u.video.format) {
Might as well use `abs` on both `width` and `height`
On Sun Apr 16 10:46:35 2023 +0000, Loïc Rebmeister wrote:
Might as well use `abs` on both `width` and `height`
AFAIK `width` is always positive.
On Sun Apr 16 10:46:35 2023 +0000, Anton Baskanov wrote:
AFAIK `width` is always positive.
Yeah but `height` should always be positive too, and here we are.
You should also check for negative values and add a `FIXME` for debug when either `width` or `height` is negative.
On Sun Apr 16 15:16:47 2023 +0000, Loïc Rebmeister wrote:
Yeah but `height` should always be positive too, and here we are. You should also check for negative values and add a `FIXME` for debug when either `width` or `height` is negative.
height can be negative (in some cases) to indicate to flip vertically the result of the operation (see WIP in MR 2159, 2471...)
On Sun Apr 16 15:56:06 2023 +0000, eric pouech wrote:
height can be negative (in some cases) to indicate to flip vertically the result of the operation (see WIP in MR 2159, 2471...)
Negative height has a special and documented meaning. That's not true of negative width. I suppose we could add a FIXME for that case, but it seems excessively paranoid.
This merge request was approved by Zebediah Figura.