Commit d90047ed authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

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

parent 957d1097
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment