Nikolay Sivov : mf/session: Propagate allocator initialization failure code (Coverity).
Alexandre Julliard
julliard at winehq.org
Thu Nov 26 16:31:00 CST 2020
Module: wine
Branch: master
Commit: 9177e80de85fe76a1edc5644bcb635be12191bb8
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9177e80de85fe76a1edc5644bcb635be12191bb8
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Nov 26 15:12:19 2020 +0300
mf/session: Propagate allocator initialization failure code (Coverity).
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mf/session.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index 6d4b58289d8..1a7439a13c3 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -794,6 +794,7 @@ static void session_shutdown_current_topology(struct media_session *session)
IMFMediaSink *sink;
IUnknown *object;
WORD idx = 0;
+ HRESULT hr;
topology = session->presentation.current_topology;
force_shutdown = session->state == SESSION_STATE_SHUT_DOWN;
@@ -813,7 +814,8 @@ static void session_shutdown_current_topology(struct media_session *session)
if (SUCCEEDED(IMFTopologyNode_GetUnknown(node, &_MF_TOPONODE_IMFActivate, &IID_IMFActivate,
(void **)&activate)))
{
- IMFActivate_ShutdownObject(activate);
+ if (FAILED(hr = IMFActivate_ShutdownObject(activate)))
+ WARN("Failed to shut down activation object for the sink, hr %#x.\n", hr);
IMFActivate_Release(activate);
}
else if (SUCCEEDED(IMFTopologyNode_GetObject(node, &object)))
@@ -1392,7 +1394,11 @@ static HRESULT session_append_node(struct media_session *session, IMFTopologyNod
if (SUCCEEDED(MFGetService(topo_node->object.object, &MR_VIDEO_ACCELERATION_SERVICE,
&IID_IMFVideoSampleAllocator, (void **)&topo_node->u.sink.allocator)))
{
- IMFVideoSampleAllocator_InitializeSampleAllocator(topo_node->u.sink.allocator, 2, media_type);
+ if (FAILED(hr = IMFVideoSampleAllocator_InitializeSampleAllocator(topo_node->u.sink.allocator,
+ 2, media_type)))
+ {
+ WARN("Failed to initialize sample allocator for the stream, hr %#x.\n", hr);
+ }
IMFVideoSampleAllocator_QueryInterface(topo_node->u.sink.allocator,
&IID_IMFVideoSampleAllocatorCallback, (void **)&topo_node->u.sink.allocator_cb);
IMFVideoSampleAllocatorCallback_SetCallback(topo_node->u.sink.allocator_cb,
More information about the wine-cvs
mailing list