Commit c678bdd7 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

msvidc: ICDecompressQuery returns ICERR_BADFORMAT on error.

parent aab254a1
......@@ -183,7 +183,7 @@ static void test_Locate(void)
bi.biCompression = mmioFOURCC('m','s','v','c');
err = ICDecompressQuery(h, &bi, &bo);
todo_wine ok(err == ICERR_BADFORMAT, "Query msvc->RGB16: %d\n", err);
ok(err == ICERR_BADFORMAT, "Query msvc->RGB16: %d\n", err);
ok(ICClose(h) == ICERR_OK,"ICClose failed\n");
}
......
......@@ -308,26 +308,26 @@ CRAM_DecompressQuery( Msvideo1Context *info, LPBITMAPINFO in, LPBITMAPINFO out )
if( ( in->bmiHeader.biCompression != CRAM_MAGIC ) &&
( in->bmiHeader.biCompression != MSVC_MAGIC ) &&
( in->bmiHeader.biCompression != WHAM_MAGIC ) )
return ICERR_UNSUPPORTED;
return ICERR_BADFORMAT;
if( ( in->bmiHeader.biBitCount != 16 ) &&
( in->bmiHeader.biBitCount != 8 ) )
{
TRACE("can't do %d bpp\n", in->bmiHeader.biBitCount );
return ICERR_UNSUPPORTED;
return ICERR_BADFORMAT;
}
/* output must be same dimensions as input */
if( out )
{
if( in->bmiHeader.biBitCount != out->bmiHeader.biBitCount )
return ICERR_UNSUPPORTED;
return ICERR_BADFORMAT;
if( in->bmiHeader.biPlanes != out->bmiHeader.biPlanes )
return ICERR_UNSUPPORTED;
return ICERR_BADFORMAT;
if( in->bmiHeader.biHeight != out->bmiHeader.biHeight )
return ICERR_UNSUPPORTED;
return ICERR_BADFORMAT;
if( in->bmiHeader.biWidth != out->bmiHeader.biWidth )
return ICERR_UNSUPPORTED;
return ICERR_BADFORMAT;
}
TRACE("OK!\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment