[PATCH 3/3] winegstreamer: Use the image size provided by GStreamer.

Zebediah Figura z.figura12 at gmail.com
Fri Mar 13 16:02:45 CDT 2020


If the stride is not equal to the width, this calculation will be invalid.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
This fixes Dark Souls II: Scholar of the First Sin, which has an 854x480 video
which we transcode to RGB24.

 dlls/winegstreamer/gstdemux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 6897eeda3f1..7595c8ec54e 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -247,7 +247,7 @@ static gboolean amt_from_gst_caps_video_raw(const GstCaps *caps, AM_MEDIA_TYPE *
         }
         bih->biCompression = amt->subtype.Data1;
     }
-    bih->biSizeImage = width * height * bih->biBitCount / 8;
+    bih->biSizeImage = vinfo.size;
     if ((vih->AvgTimePerFrame = (REFERENCE_TIME)MulDiv(10000000, denom, nom)) == -1)
         vih->AvgTimePerFrame = 0; /* zero division or integer overflow */
     bih->biSize = sizeof(*bih);
-- 
2.25.1




More information about the wine-devel mailing list