Commit 29b35f6b authored by Ziqing Hui's avatar Ziqing Hui Committed by Alexandre Julliard

winegstreamer: Use NTSTATUS value in wg_muxer_create.

parent 729ed419
......@@ -466,13 +466,17 @@ HRESULT wg_muxer_create(const char *format, wg_muxer_t *muxer)
TRACE("format %p, muxer %p.\n", format, muxer);
if (SUCCEEDED(status = WINE_UNIX_CALL(unix_wg_muxer_create, &params)))
if (!(status = WINE_UNIX_CALL(unix_wg_muxer_create, &params)))
{
*muxer = params.muxer;
TRACE("Created wg_muxer %#I64x.\n", params.muxer);
}
else
{
WARN("Failed to create muxer, status %#lx.\n", status);
}
return status;
return HRESULT_FROM_NT(status);
}
void wg_muxer_destroy(wg_muxer_t muxer)
......
......@@ -61,14 +61,14 @@ NTSTATUS wg_muxer_create(void *args)
{
struct wg_muxer_create_params *params = args;
GstElement *first = NULL, *last = NULL;
NTSTATUS status = STATUS_UNSUCCESSFUL;
GstPadTemplate *template = NULL;
GstCaps *sink_caps = NULL;
NTSTATUS status = E_FAIL;
struct wg_muxer *muxer;
/* Create wg_muxer object. */
if (!(muxer = calloc(1, sizeof(*muxer))))
return E_OUTOFMEMORY;
return STATUS_NO_MEMORY;
if (!(muxer->container = gst_bin_new("wg_muxer")))
goto out;
......@@ -110,7 +110,7 @@ NTSTATUS wg_muxer_create(void *args)
GST_INFO("Created winegstreamer muxer %p.", muxer);
params->muxer = (wg_transform_t)(ULONG_PTR)muxer;
return S_OK;
return STATUS_SUCCESS;
out:
if (muxer->my_sink)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment