winegstreamer: Use the image size provided by GStreamer.

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

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-03-16 14:40:16 -05:00 committed by Alexandre Julliard
parent 1bb868e9c1
commit 8575484f21
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ static gboolean amt_from_gst_video_info(const GstVideoInfo *info, AM_MEDIA_TYPE
} }
bih->biCompression = amt->subtype.Data1; bih->biCompression = amt->subtype.Data1;
} }
bih->biSizeImage = width * height * bih->biBitCount / 8; bih->biSizeImage = GST_VIDEO_INFO_SIZE(info);
if ((vih->AvgTimePerFrame = (REFERENCE_TIME)MulDiv(10000000, if ((vih->AvgTimePerFrame = (REFERENCE_TIME)MulDiv(10000000,
GST_VIDEO_INFO_FPS_D(info), GST_VIDEO_INFO_FPS_N(info))) == -1) GST_VIDEO_INFO_FPS_D(info), GST_VIDEO_INFO_FPS_N(info))) == -1)
vih->AvgTimePerFrame = 0; /* zero division or integer overflow */ vih->AvgTimePerFrame = 0; /* zero division or integer overflow */