qcap/filewriter: Propagate file I/O failure in file_writer_sink_receive().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
49f85ecbc4
commit
fc45c96383
|
@ -85,7 +85,11 @@ static HRESULT WINAPI file_writer_sink_receive(struct strmbase_sink *iface, IMed
|
||||||
offset.QuadPart = start;
|
offset.QuadPart = start;
|
||||||
if (!SetFilePointerEx(filter->file, offset, NULL, FILE_BEGIN)
|
if (!SetFilePointerEx(filter->file, offset, NULL, FILE_BEGIN)
|
||||||
|| !WriteFile(filter->file, data, stop - start, &size, NULL))
|
|| !WriteFile(filter->file, data, stop - start, &size, NULL))
|
||||||
|
{
|
||||||
ERR("Failed to write file, error %u.\n", GetLastError());
|
ERR("Failed to write file, error %u.\n", GetLastError());
|
||||||
|
return HRESULT_FROM_WIN32(hr);
|
||||||
|
}
|
||||||
|
|
||||||
if (size != stop - start)
|
if (size != stop - start)
|
||||||
ERR("Short write, %u/%u.\n", size, (DWORD)(stop - start));
|
ERR("Short write, %u/%u.\n", size, (DWORD)(stop - start));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue