msvidc: ICDecompressQuery returns ICERR_BADFORMAT on error.

This commit is contained in:
Jörg Höhle 2010-06-08 17:25:39 +02:00 committed by Alexandre Julliard
parent aab254a11e
commit c678bdd718
2 changed files with 7 additions and 7 deletions

View File

@ -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");
}

View File

@ -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");