avifil32: Correctly handle compressed frames when desired format is specified.
From: Michael Müller <michael@fds-team.de> Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a2c10f4dca
commit
da0f196c93
|
@ -405,8 +405,6 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
|
||||||
lpbi->biSize + lpbi->biClrUsed * sizeof(RGBQUAD));
|
lpbi->biSize + lpbi->biClrUsed * sizeof(RGBQUAD));
|
||||||
if (lpbi->biBitCount <= 8)
|
if (lpbi->biBitCount <= 8)
|
||||||
ICDecompressGetPalette(This->hic, This->lpInFormat, This->lpOutFormat);
|
ICDecompressGetPalette(This->hic, This->lpInFormat, This->lpOutFormat);
|
||||||
|
|
||||||
return AVIERR_OK;
|
|
||||||
} else {
|
} else {
|
||||||
if (bBestDisplay) {
|
if (bBestDisplay) {
|
||||||
ICGetDisplayFormat(This->hic, This->lpInFormat,
|
ICGetDisplayFormat(This->hic, This->lpInFormat,
|
||||||
|
@ -416,6 +414,7 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
|
||||||
AVIFILE_CloseCompressor(This);
|
AVIFILE_CloseCompressor(This);
|
||||||
return AVIERR_NOCOMPRESSOR;
|
return AVIERR_NOCOMPRESSOR;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* check output format */
|
/* check output format */
|
||||||
if (This->lpOutFormat->biClrUsed == 0 &&
|
if (This->lpOutFormat->biClrUsed == 0 &&
|
||||||
|
@ -474,7 +473,6 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
|
||||||
|
|
||||||
return AVIERR_COMPRESSOR;
|
return AVIERR_COMPRESSOR;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static const struct IGetFrameVtbl igetframeVtbl = {
|
static const struct IGetFrameVtbl igetframeVtbl = {
|
||||||
IGetFrame_fnQueryInterface,
|
IGetFrame_fnQueryInterface,
|
||||||
|
|
Loading…
Reference in New Issue