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:
Michael Müller 2019-05-02 02:43:03 +02:00 committed by Alexandre Julliard
parent a2c10f4dca
commit da0f196c93
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)); 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 &&
@ -473,7 +472,6 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
AVIFILE_CloseCompressor(This); AVIFILE_CloseCompressor(This);
return AVIERR_COMPRESSOR; return AVIERR_COMPRESSOR;
}
} }
static const struct IGetFrameVtbl igetframeVtbl = { static const struct IGetFrameVtbl igetframeVtbl = {