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>
(cherry picked from commit da0f196c93)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Michael Müller 2019-05-02 02:43:03 +02:00 committed by Michael Stefaniuc
parent 91fdecbd95
commit 0135e88483
1 changed files with 57 additions and 59 deletions

View File

@ -405,8 +405,6 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
lpbi->biSize + lpbi->biClrUsed * sizeof(RGBQUAD));
if (lpbi->biBitCount <= 8)
ICDecompressGetPalette(This->hic, This->lpInFormat, This->lpOutFormat);
return AVIERR_OK;
} else {
if (bBestDisplay) {
ICGetDisplayFormat(This->hic, This->lpInFormat,
@ -416,6 +414,7 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
AVIFILE_CloseCompressor(This);
return AVIERR_NOCOMPRESSOR;
}
}
/* check output format */
if (This->lpOutFormat->biClrUsed == 0 &&
@ -474,7 +473,6 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
return AVIERR_COMPRESSOR;
}
}
static const struct IGetFrameVtbl igetframeVtbl = {
IGetFrame_fnQueryInterface,