Anton Baskanov (@baskanov) commented about dlls/amstream/ddrawstream.c:
return S_OK;
}
+static void set_mt_from_desc(AM_MEDIA_TYPE *mt, const DDSURFACEDESC *format) +{
- VIDEOINFOHEADER *videoinfo;
- videoinfo = (VIDEOINFOHEADER*)mt->pbFormat;
- videoinfo->bmiHeader.biWidth = format->dwWidth;
- videoinfo->bmiHeader.biHeight = format->dwHeight;
- if (format->ddpfPixelFormat.dwRGBBitCount == 16 && format->ddpfPixelFormat.dwRBitMask == 0x7c00)
mt->subtype = MEDIASUBTYPE_RGB555;
You also have to set `biBitCount`, `biCompression` and `biSizeImage`. And for RGB565 you have to put the bit masks right after the `BITMAPINFOHEADER` (see e.g. [quartz_parser.c:598](dlls/winegstreamer/quartz_parser.c?ref_type=heads#L598)). This means you'll have to allocate memory for the new format block.