Commit aa9aa739 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

strmbase: Add a separate id for pins.

parent f3836941
......@@ -36,6 +36,7 @@ struct strmbase_pin
struct strmbase_filter *filter;
PIN_DIRECTION dir;
WCHAR name[128];
WCHAR id[128];
IPin *peer;
AM_MEDIA_TYPE mt;
......
......@@ -436,7 +436,7 @@ static HRESULT WINAPI filter_FindPin(IBaseFilter *iface, const WCHAR *id, IPin *
for (i = 0; (pin = filter->ops->filter_get_pin(filter, i)); ++i)
{
if (!lstrcmpW(id, pin->name))
if (!lstrcmpW(id, pin->id))
{
IPin_AddRef(*ret = &pin->IPin_iface);
return S_OK;
......
......@@ -383,10 +383,10 @@ static HRESULT WINAPI pin_QueryId(IPin *iface, WCHAR **id)
TRACE("pin %p %s:%s, id %p.\n", pin, debugstr_w(pin->filter->name), debugstr_w(pin->name), id);
if (!(*id = CoTaskMemAlloc((lstrlenW(pin->name) + 1) * sizeof(WCHAR))))
if (!(*id = CoTaskMemAlloc((lstrlenW(pin->id) + 1) * sizeof(WCHAR))))
return E_OUTOFMEMORY;
lstrcpyW(*id, pin->name);
lstrcpyW(*id, pin->id);
return S_OK;
}
......@@ -770,6 +770,7 @@ void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *f
pin->pin.filter = filter;
pin->pin.dir = PINDIR_OUTPUT;
lstrcpyW(pin->pin.name, name);
lstrcpyW(pin->pin.id, name);
pin->pin.ops = &func_table->base;
pin->pFuncsTable = func_table;
}
......@@ -1172,6 +1173,7 @@ void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filte
pin->pin.filter = filter;
pin->pin.dir = PINDIR_INPUT;
lstrcpyW(pin->pin.name, name);
lstrcpyW(pin->pin.id, name);
pin->pin.ops = &func_table->base;
pin->pFuncsTable = func_table;
pin->pAllocator = pin->preferred_allocator = allocator;
......
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