Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
50a06d0d
Commit
50a06d0d
authored
Apr 08, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/filewriter: Avoid casting to DWORD in an ERR message.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
10667b39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
filewriter.c
dlls/qcap/filewriter.c
+5
-4
No files found.
dlls/qcap/filewriter.c
View file @
50a06d0d
...
...
@@ -68,26 +68,27 @@ static HRESULT WINAPI file_writer_sink_receive(struct strmbase_sink *iface, IMed
struct
file_writer
*
filter
=
impl_from_strmbase_pin
(
&
iface
->
pin
);
REFERENCE_TIME
start
,
stop
;
LARGE_INTEGER
offset
;
DWORD
size
,
ret_size
;
HRESULT
hr
;
DWORD
size
;
BYTE
*
data
;
if
((
hr
=
IMediaSample_GetTime
(
sample
,
&
start
,
&
stop
))
!=
S_OK
)
ERR
(
"Failed to get sample time, hr %#lx.
\n
"
,
hr
);
size
=
stop
-
start
;
if
((
hr
=
IMediaSample_GetPointer
(
sample
,
&
data
))
!=
S_OK
)
ERR
(
"Failed to get sample pointer, hr %#lx.
\n
"
,
hr
);
offset
.
QuadPart
=
start
;
if
(
!
SetFilePointerEx
(
filter
->
file
,
offset
,
NULL
,
FILE_BEGIN
)
||
!
WriteFile
(
filter
->
file
,
data
,
s
top
-
start
,
&
size
,
NULL
))
||
!
WriteFile
(
filter
->
file
,
data
,
s
ize
,
&
ret_
size
,
NULL
))
{
ERR
(
"Failed to write file, error %lu.
\n
"
,
GetLastError
());
return
HRESULT_FROM_WIN32
(
hr
);
}
if
(
size
!=
stop
-
start
)
ERR
(
"Short write, %lu/%lu.
\n
"
,
size
,
(
DWORD
)(
stop
-
start
)
);
if
(
ret_size
!=
size
)
ERR
(
"Short write, %lu/%lu.
\n
"
,
ret_size
,
size
);
return
S_OK
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment