msvidc: ICDecompressQuery returns ICERR_BADFORMAT on error.
This commit is contained in:
parent
aab254a11e
commit
c678bdd718
|
@ -183,7 +183,7 @@ static void test_Locate(void)
|
||||||
|
|
||||||
bi.biCompression = mmioFOURCC('m','s','v','c');
|
bi.biCompression = mmioFOURCC('m','s','v','c');
|
||||||
err = ICDecompressQuery(h, &bi, &bo);
|
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");
|
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 ) &&
|
if( ( in->bmiHeader.biCompression != CRAM_MAGIC ) &&
|
||||||
( in->bmiHeader.biCompression != MSVC_MAGIC ) &&
|
( in->bmiHeader.biCompression != MSVC_MAGIC ) &&
|
||||||
( in->bmiHeader.biCompression != WHAM_MAGIC ) )
|
( in->bmiHeader.biCompression != WHAM_MAGIC ) )
|
||||||
return ICERR_UNSUPPORTED;
|
return ICERR_BADFORMAT;
|
||||||
|
|
||||||
if( ( in->bmiHeader.biBitCount != 16 ) &&
|
if( ( in->bmiHeader.biBitCount != 16 ) &&
|
||||||
( in->bmiHeader.biBitCount != 8 ) )
|
( in->bmiHeader.biBitCount != 8 ) )
|
||||||
{
|
{
|
||||||
TRACE("can't do %d bpp\n", in->bmiHeader.biBitCount );
|
TRACE("can't do %d bpp\n", in->bmiHeader.biBitCount );
|
||||||
return ICERR_UNSUPPORTED;
|
return ICERR_BADFORMAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* output must be same dimensions as input */
|
/* output must be same dimensions as input */
|
||||||
if( out )
|
if( out )
|
||||||
{
|
{
|
||||||
if( in->bmiHeader.biBitCount != out->bmiHeader.biBitCount )
|
if( in->bmiHeader.biBitCount != out->bmiHeader.biBitCount )
|
||||||
return ICERR_UNSUPPORTED;
|
return ICERR_BADFORMAT;
|
||||||
if( in->bmiHeader.biPlanes != out->bmiHeader.biPlanes )
|
if( in->bmiHeader.biPlanes != out->bmiHeader.biPlanes )
|
||||||
return ICERR_UNSUPPORTED;
|
return ICERR_BADFORMAT;
|
||||||
if( in->bmiHeader.biHeight != out->bmiHeader.biHeight )
|
if( in->bmiHeader.biHeight != out->bmiHeader.biHeight )
|
||||||
return ICERR_UNSUPPORTED;
|
return ICERR_BADFORMAT;
|
||||||
if( in->bmiHeader.biWidth != out->bmiHeader.biWidth )
|
if( in->bmiHeader.biWidth != out->bmiHeader.biWidth )
|
||||||
return ICERR_UNSUPPORTED;
|
return ICERR_BADFORMAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("OK!\n");
|
TRACE("OK!\n");
|
||||||
|
|
Loading…
Reference in New Issue