windowscodecs: PNG decoder should return WINCODEC_ERR_UNKNOWNIMAGEFORMAT when image loading fails.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-11-30 09:53:31 +03:00 committed by Alexandre Julliard
parent 957d1097d2
commit d90047ed91
2 changed files with 1 additions and 5 deletions

View file

@ -622,7 +622,7 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p
ppng_destroy_read_struct(&This->png_ptr, &This->info_ptr, &This->end_info);
HeapFree(GetProcessHeap(), 0, row_pointers);
This->png_ptr = NULL;
hr = E_FAIL;
hr = WINCODEC_ERR_UNKNOWNIMAGEFORMAT;
goto end;
}
ppng_set_error_fn(This->png_ptr, jmpbuf, user_error_fn, user_warning_fn);

View file

@ -811,7 +811,6 @@ static void test_color_formats(void)
hr = create_decoder(buf, sizeof(buf), &decoder);
if (!is_valid_png_type_depth(td[i].color_type, td[i].bit_depth, TRUE))
todo_wine
ok(hr == WINCODEC_ERR_UNKNOWNIMAGEFORMAT, "%d: wrong error %#x\n", i, hr);
else
todo_wine_if(td[i].todo_load)
@ -840,7 +839,6 @@ next_1:
hr = create_decoder(buf, sizeof(buf), &decoder);
if (!is_valid_png_type_depth(td[i].color_type, td[i].bit_depth, TRUE))
todo_wine
ok(hr == WINCODEC_ERR_UNKNOWNIMAGEFORMAT, "%d: wrong error %#x\n", i, hr);
else
todo_wine_if(td[i].todo_load)
@ -869,7 +867,6 @@ next_2:
hr = create_decoder(buf, sizeof(buf), &decoder);
if (!is_valid_png_type_depth(td[i].color_type, td[i].bit_depth, FALSE))
todo_wine
ok(hr == WINCODEC_ERR_UNKNOWNIMAGEFORMAT, "%d: wrong error %#x\n", i, hr);
else
todo_wine_if(td[i].todo_load)
@ -897,7 +894,6 @@ next_3:
hr = create_decoder(buf, sizeof(buf), &decoder);
if (!is_valid_png_type_depth(td[i].color_type, td[i].bit_depth, FALSE))
todo_wine
ok(hr == WINCODEC_ERR_UNKNOWNIMAGEFORMAT, "%d: wrong error %#x\n", i, hr);
else
todo_wine_if(td[i].todo_load)