mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
msvidc32: Reject incompatible output compression.
This commit is contained in:
parent
681f407a81
commit
bb4e050f66
2 changed files with 8 additions and 1 deletions
|
@ -333,6 +333,13 @@ CRAM_DecompressQuery( Msvideo1Context *info, LPBITMAPINFO in, LPBITMAPINFO out )
|
|||
TRACE("out->height = %ld\n", out->bmiHeader.biHeight );
|
||||
TRACE("out->width = %ld\n", out->bmiHeader.biWidth );
|
||||
|
||||
if ((out->bmiHeader.biCompression != BI_RGB) &&
|
||||
(out->bmiHeader.biCompression != BI_BITFIELDS))
|
||||
{
|
||||
TRACE("incompatible compression requested\n");
|
||||
return ICERR_BADFORMAT;
|
||||
}
|
||||
|
||||
if ((in->bmiHeader.biBitCount != out->bmiHeader.biBitCount) &&
|
||||
(in->bmiHeader.biBitCount != 16 || out->bmiHeader.biBitCount != 24))
|
||||
{
|
||||
|
|
|
@ -213,7 +213,7 @@ static void test_ICDecompressQuery(void)
|
|||
ok(lr == ICERR_OK, "got lr %Id.\n", lr);
|
||||
|
||||
lr = ICDecompressQuery(hic, &format_cram16, &format_yvuv);
|
||||
todo_wine ok(lr == ICERR_BADFORMAT, "got lr %Id.\n", lr);
|
||||
ok(lr == ICERR_BADFORMAT, "got lr %Id.\n", lr);
|
||||
|
||||
ICClose(hic);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue