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>
feature/deterministic
Zebediah Figura 2020-05-01 12:45:04 -05:00 committed by Alexandre Julliard
parent 49f85ecbc4
commit fc45c96383
1 changed files with 4 additions and 0 deletions

View File

@ -85,7 +85,11 @@ static HRESULT WINAPI file_writer_sink_receive(struct strmbase_sink *iface, IMed
offset.QuadPart = start;
if (!SetFilePointerEx(filter->file, offset, NULL, FILE_BEGIN)
|| !WriteFile(filter->file, data, stop - start, &size, NULL))
{
ERR("Failed to write file, error %u.\n", GetLastError());
return HRESULT_FROM_WIN32(hr);
}
if (size != stop - start)
ERR("Short write, %u/%u.\n", size, (DWORD)(stop - start));