[PATCH 3/3] winegstreamer: Use the image size provided by GStreamer.
Zebediah Figura
zfigura at codeweavers.com
Mon Mar 16 14:21:47 CDT 2020
On 3/16/20 6:35 AM, Andrew Eikum wrote:
> On Fri, Mar 13, 2020 at 04:02:45PM -0500, Zebediah Figura wrote:
>> 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;
>
> I think this won't actually fix the game. I'm pretty sure the
> calculation we use to determine the buffer size is the one in
> amt_from_gst_caps.
Thanks, good point. I've sent a new patch that should fix that. The
first two patches in this series should apply independent of that.
>
> (Also note the game's video does play back fine. It was my
> substitution of a different OGG video with that resolution that broke
> it.)
>
> Andrew
>
More information about the wine-devel
mailing list