Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
eead400b
Commit
eead400b
authored
Mar 17, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Fix optional buffer argument handling in ConvertToContiguousBuffer().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6601fb3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
buffer.c
dlls/mfplat/buffer.c
+1
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+18
-2
No files found.
dlls/mfplat/buffer.c
View file @
eead400b
...
...
@@ -1235,7 +1235,7 @@ static HRESULT WINAPI sample_ConvertToContiguousBuffer(IMFSample *iface, IMFMedi
}
}
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
)
&&
buffer
)
{
*
buffer
=
sample
->
buffers
[
0
];
IMFMediaBuffer_AddRef
(
*
buffer
);
...
...
dlls/mfplat/tests/mfplat.c
View file @
eead400b
...
...
@@ -1993,6 +1993,9 @@ static void test_sample(void)
ok
(
buffer2
==
buffer
,
"Unexpected buffer instance.
\n
"
);
IMFMediaBuffer_Release
(
buffer2
);
hr
=
IMFSample_ConvertToContiguousBuffer
(
sample
,
NULL
);
ok
(
hr
==
S_OK
,
"Failed to convert, hr %#x.
\n
"
,
hr
);
hr
=
IMFSample_ConvertToContiguousBuffer
(
sample
,
&
buffer2
);
ok
(
hr
==
S_OK
,
"Failed to convert, hr %#x.
\n
"
,
hr
);
ok
(
buffer2
==
buffer
,
"Unexpected buffer instance.
\n
"
);
...
...
@@ -2026,8 +2029,21 @@ static void test_sample(void)
ok
(
hr
==
S_OK
,
"Failed to get maximum length, hr %#x.
\n
"
,
hr
);
ok
(
length
==
7
,
"Unexpected length %u.
\n
"
,
length
);
if
(
SUCCEEDED
(
hr
))
IMFMediaBuffer_Release
(
buffer3
);
IMFMediaBuffer_Release
(
buffer3
);
hr
=
IMFSample_GetBufferCount
(
sample
,
&
count
);
ok
(
hr
==
S_OK
,
"Failed to get buffer count, hr %#x.
\n
"
,
hr
);
ok
(
count
==
1
,
"Unexpected buffer count %u.
\n
"
,
count
);
hr
=
IMFSample_AddBuffer
(
sample
,
buffer
);
ok
(
hr
==
S_OK
,
"Failed to add buffer, hr %#x.
\n
"
,
hr
);
hr
=
IMFSample_GetBufferCount
(
sample
,
&
count
);
ok
(
hr
==
S_OK
,
"Failed to get buffer count, hr %#x.
\n
"
,
hr
);
ok
(
count
==
2
,
"Unexpected buffer count %u.
\n
"
,
count
);
hr
=
IMFSample_ConvertToContiguousBuffer
(
sample
,
NULL
);
ok
(
hr
==
S_OK
,
"Failed to convert, hr %#x.
\n
"
,
hr
);
hr
=
IMFSample_GetBufferCount
(
sample
,
&
count
);
ok
(
hr
==
S_OK
,
"Failed to get buffer count, hr %#x.
\n
"
,
hr
);
...
...
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