Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56769
-- v3: quartz: Implement AMT/WMT differences for WMV media type.
From: Alfred Agrell floating@muncher.se
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56769 --- dlls/winegstreamer/quartz_parser.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index 125e5c00c0f..3902c652648 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -630,7 +630,7 @@ static bool amt_from_wg_format_video_cinepak(AM_MEDIA_TYPE *mt, const struct wg_ return true; }
-static bool amt_from_wg_format_video_wmv(AM_MEDIA_TYPE *mt, const struct wg_format *format) +static bool amt_from_wg_format_video_wmv(AM_MEDIA_TYPE *mt, const struct wg_format *format, bool wm) { VIDEOINFOHEADER *video_format; uint32_t frame_time; @@ -671,7 +671,8 @@ static bool amt_from_wg_format_video_wmv(AM_MEDIA_TYPE *mt, const struct wg_form mt->pbFormat = (BYTE *)video_format;
memset(video_format, 0, sizeof(*video_format)); - SetRect(&video_format->rcSource, 0, 0, format->u.video.width, format->u.video.height); + if (wm) + SetRect(&video_format->rcSource, 0, 0, format->u.video.width, format->u.video.height); video_format->rcTarget = video_format->rcSource; if ((frame_time = MulDiv(10000000, format->u.video.fps_d, format->u.video.fps_n)) != -1) video_format->AvgTimePerFrame = frame_time; @@ -681,6 +682,8 @@ static bool amt_from_wg_format_video_wmv(AM_MEDIA_TYPE *mt, const struct wg_form video_format->bmiHeader.biPlanes = 1; video_format->bmiHeader.biCompression = mt->subtype.Data1; video_format->bmiHeader.biBitCount = 24; + if (!wm) + video_format->bmiHeader.biSizeImage = 3 * format->u.video.width * format->u.video.height; video_format->dwBitRate = 0; memcpy(video_format+1, format->u.video.codec_data, format->u.video.codec_data_len);
@@ -747,7 +750,7 @@ bool amt_from_wg_format(AM_MEDIA_TYPE *mt, const struct wg_format *format, bool return amt_from_wg_format_video_cinepak(mt, format);
case WG_MAJOR_TYPE_VIDEO_WMV: - return amt_from_wg_format_video_wmv(mt, format); + return amt_from_wg_format_video_wmv(mt, format, wm);
case WG_MAJOR_TYPE_VIDEO_MPEG1: return amt_from_wg_format_video_mpeg1(mt, format);
Huh. I did not know you could put WMV in an AVI container. That's cool.
This merge request was approved by Elizabeth Figura.
Neither does ffmpeg and GStreamer. If they did, I would've added a test.
But all I have is the Death To Spies logo files, and I don't think you want that in winetest.