[PATCH v5 2/5] windowscodecs: In find_decoder(), get rid of nested if by using goto, and use IWICWineDecoder_Initialize() to initialize decoders.
15 Jul
2020
15 Jul
'20
9:04 a.m.
Signed-off-by: Ziqing Hui <zhui(a)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(-)
15 Jul
15 Jul
1:29 p.m.
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.
1982
Age (days ago)
1982
Last active (days ago)
1 comments
2 participants
participants (2)
-
Esme Povirk (they/them) -
Ziqing Hui