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

strmbase: Avoid unnecessary use of IPin::ConnectedTo().

parent bcb05ad2
...@@ -177,6 +177,8 @@ VOID WINAPI OutputQueue_SendAnyway(OutputQueue *pOutputQueue) ...@@ -177,6 +177,8 @@ VOID WINAPI OutputQueue_SendAnyway(OutputQueue *pOutputQueue)
VOID WINAPI OutputQueue_EOS(OutputQueue *pOutputQueue) VOID WINAPI OutputQueue_EOS(OutputQueue *pOutputQueue)
{ {
IPin *peer;
EnterCriticalSection(&pOutputQueue->csQueue); EnterCriticalSection(&pOutputQueue->csQueue);
if (pOutputQueue->hThread) if (pOutputQueue->hThread)
{ {
...@@ -191,16 +193,8 @@ VOID WINAPI OutputQueue_EOS(OutputQueue *pOutputQueue) ...@@ -191,16 +193,8 @@ VOID WINAPI OutputQueue_EOS(OutputQueue *pOutputQueue)
qev->pSample = NULL; qev->pSample = NULL;
list_add_tail(&pOutputQueue->SampleList, &qev->entry); list_add_tail(&pOutputQueue->SampleList, &qev->entry);
} }
else else if ((peer = pOutputQueue->pInputPin->pin.peer))
{ IPin_EndOfStream(peer);
IPin* ppin = NULL;
IPin_ConnectedTo(&pOutputQueue->pInputPin->pin.IPin_iface, &ppin);
if (ppin)
{
IPin_EndOfStream(ppin);
IPin_Release(ppin);
}
}
LeaveCriticalSection(&pOutputQueue->csQueue); LeaveCriticalSection(&pOutputQueue->csQueue);
/* Covers sending the Event to the worker Thread */ /* Covers sending the Event to the worker Thread */
OutputQueue_SendAnyway(pOutputQueue); OutputQueue_SendAnyway(pOutputQueue);
...@@ -259,13 +253,9 @@ DWORD WINAPI OutputQueueImpl_ThreadProc(OutputQueue *pOutputQueue) ...@@ -259,13 +253,9 @@ DWORD WINAPI OutputQueueImpl_ThreadProc(OutputQueue *pOutputQueue)
QueuedEvent *qev = LIST_ENTRY(cursor, QueuedEvent, entry); QueuedEvent *qev = LIST_ENTRY(cursor, QueuedEvent, entry);
if (qev->type == EOS_PACKET) if (qev->type == EOS_PACKET)
{ {
IPin* ppin = NULL; IPin *peer;
IPin_ConnectedTo(&pOutputQueue->pInputPin->pin.IPin_iface, &ppin); if ((peer = pOutputQueue->pInputPin->pin.peer))
if (ppin) IPin_EndOfStream(peer);
{
IPin_EndOfStream(ppin);
IPin_Release(ppin);
}
} }
else if (qev->type == SAMPLE_PACKET) else if (qev->type == SAMPLE_PACKET)
break; break;
......
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