Signed-off-by: Ziqing Hui zhui@codeweavers.com ---
If we keep the nested if in find_decoder(), after code for calling IWICWineDecoder_Initialize() is added, the nested blocks will become too deep, which makes the code really hard to read. So here I use goto to get rid of them.
v5: It's a new patch in this patch set.
dlls/windowscodecs/imgfactory.c | 101 ++++++++++++++++---------------- 1 file changed, 50 insertions(+), 51 deletions(-)
The end of the loop checks the interface pointers and releases them, but it doesn't set them to NULL. This might cause us to release the interfaces too many times. I suggest moving the declaration of wine_decoder, decoderinfo, and unkdecoderinfo inside the loop.