Commit dc6e0a6c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz/mpegsplit: Fix sink pin name.

This fixes a bug with Neocron 2, which uses FindPin() to retrieve the sink pin. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent c2f4e2b3
......@@ -1429,6 +1429,7 @@ static const IBaseFilterVtbl AVISplitterImpl_Vtbl =
HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
{
static const WCHAR sink_name[] = {'i','n','p','u','t',' ','p','i','n',0};
HRESULT hr;
AVISplitterImpl * This;
......@@ -1445,7 +1446,11 @@ HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
This->streams = NULL;
This->oldindex = NULL;
hr = Parser_Create(&(This->Parser), &AVISplitterImpl_Vtbl, &CLSID_AviSplitter, AVISplitter_Sample, AVISplitter_QueryAccept, AVISplitter_InputPin_PreConnect, AVISplitter_Flush, AVISplitter_Disconnect, AVISplitter_first_request, AVISplitter_done_process, NULL, AVISplitter_seek, NULL);
hr = Parser_Create(&This->Parser, &AVISplitterImpl_Vtbl, &CLSID_AviSplitter,
sink_name, AVISplitter_Sample, AVISplitter_QueryAccept,
AVISplitter_InputPin_PreConnect, AVISplitter_Flush,
AVISplitter_Disconnect, AVISplitter_first_request,
AVISplitter_done_process, NULL, AVISplitter_seek, NULL);
if (FAILED(hr))
return hr;
......
......@@ -870,6 +870,7 @@ static const IAMStreamSelectVtbl AMStreamSelectVtbl =
HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
{
static const WCHAR sink_name[] = {'I','n','p','u','t',0};
MPEGSplitterImpl *This;
HRESULT hr = E_FAIL;
......@@ -885,7 +886,10 @@ HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
return E_OUTOFMEMORY;
ZeroMemory(This, sizeof(MPEGSplitterImpl));
hr = Parser_Create(&(This->Parser), &MPEGSplitter_Vtbl, &CLSID_MPEG1Splitter, MPEGSplitter_process_sample, MPEGSplitter_query_accept, MPEGSplitter_pre_connect, MPEGSplitter_cleanup, MPEGSplitter_disconnect, MPEGSplitter_first_request, NULL, NULL, MPEGSplitter_seek, NULL);
hr = Parser_Create(&This->Parser, &MPEGSplitter_Vtbl, &CLSID_MPEG1Splitter,
sink_name, MPEGSplitter_process_sample, MPEGSplitter_query_accept,
MPEGSplitter_pre_connect, MPEGSplitter_cleanup, MPEGSplitter_disconnect,
MPEGSplitter_first_request, NULL, NULL, MPEGSplitter_seek, NULL);
if (FAILED(hr))
{
CoTaskMemFree(This);
......
......@@ -35,7 +35,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
static const IMediaSeekingVtbl Parser_Seeking_Vtbl;
static const IPinVtbl Parser_OutputPin_Vtbl;
static const IPinVtbl Parser_InputPin_Vtbl;
......@@ -93,7 +92,12 @@ static const BaseFilterFuncTable BaseFuncTable = {
Parser_GetPinCount
};
HRESULT Parser_Create(ParserImpl* pParser, const IBaseFilterVtbl *Parser_Vtbl, const CLSID* pClsid, PFN_PROCESS_SAMPLE fnProcessSample, PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect, PFN_CLEANUP fnCleanup, PFN_DISCONNECT fnDisconnect, REQUESTPROC fnRequest, STOPPROCESSPROC fnDone, SourceSeeking_ChangeStop stop, SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate)
HRESULT Parser_Create(ParserImpl *pParser, const IBaseFilterVtbl *Parser_Vtbl,
const CLSID* pClsid, const WCHAR *sink_name, PFN_PROCESS_SAMPLE fnProcessSample,
PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect,
PFN_CLEANUP fnCleanup, PFN_DISCONNECT fnDisconnect, REQUESTPROC fnRequest,
STOPPROCESSPROC fnDone, SourceSeeking_ChangeStop stop,
SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate)
{
HRESULT hr;
PIN_INFO piInput;
......@@ -109,7 +113,7 @@ HRESULT Parser_Create(ParserImpl* pParser, const IBaseFilterVtbl *Parser_Vtbl, c
/* construct input pin */
piInput.dir = PINDIR_INPUT;
piInput.pFilter = &pParser->filter.IBaseFilter_iface;
lstrcpynW(piInput.achName, wcsInputPinName, ARRAY_SIZE(piInput.achName));
lstrcpynW(piInput.achName, sink_name, ARRAY_SIZE(piInput.achName));
if (!start)
start = Parser_ChangeStart;
......
......@@ -53,8 +53,11 @@ typedef struct Parser_OutputPin
extern HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PROPERTIES * props, const AM_MEDIA_TYPE * amt);
extern HRESULT Parser_Create(ParserImpl*, const IBaseFilterVtbl *, const CLSID*, PFN_PROCESS_SAMPLE, PFN_QUERY_ACCEPT, PFN_PRE_CONNECT,
PFN_CLEANUP, PFN_DISCONNECT, REQUESTPROC, STOPPROCESSPROC, SourceSeeking_ChangeStop stop, SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate);
HRESULT Parser_Create(ParserImpl *parser, const IBaseFilterVtbl *vtbl,
const CLSID *clsid, const WCHAR *sink_name, PFN_PROCESS_SAMPLE,
PFN_QUERY_ACCEPT, PFN_PRE_CONNECT, PFN_CLEANUP, PFN_DISCONNECT,
REQUESTPROC, STOPPROCESSPROC, SourceSeeking_ChangeStop,
SourceSeeking_ChangeStart, SourceSeeking_ChangeRate) DECLSPEC_HIDDEN;
/* Override the _Release function and call this when releasing */
extern void Parser_Destroy(ParserImpl *This);
......
......@@ -417,6 +417,7 @@ static const IBaseFilterVtbl WAVEParser_Vtbl =
HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)
{
static const WCHAR sink_name[] = {'i','n','p','u','t',' ','p','i','n',0};
HRESULT hr;
WAVEParserImpl * This;
......@@ -430,7 +431,10 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)
/* Note: This memory is managed by the transform filter once created */
This = CoTaskMemAlloc(sizeof(WAVEParserImpl));
hr = Parser_Create(&(This->Parser), &WAVEParser_Vtbl, &CLSID_WAVEParser, WAVEParser_Sample, WAVEParser_QueryAccept, WAVEParser_InputPin_PreConnect, WAVEParser_Cleanup, WAVEParser_disconnect, WAVEParser_first_request, NULL, NULL, WAVEParserImpl_seek, NULL);
hr = Parser_Create(&This->Parser, &WAVEParser_Vtbl, &CLSID_WAVEParser,
sink_name, WAVEParser_Sample, WAVEParser_QueryAccept,
WAVEParser_InputPin_PreConnect, WAVEParser_Cleanup, WAVEParser_disconnect,
WAVEParser_first_request, NULL, NULL, WAVEParserImpl_seek, NULL);
if (FAILED(hr))
return hr;
......
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