quartz: Change VideoRenderer_Run to handle EndOfStream slightly better.
This commit is contained in:
parent
0a4adc1f10
commit
f63950d023
|
@ -821,19 +821,17 @@ static HRESULT WINAPI VideoRenderer_Run(IBaseFilter * iface, REFERENCE_TIME tSta
|
||||||
EnterCriticalSection(&This->filter.csFilter);
|
EnterCriticalSection(&This->filter.csFilter);
|
||||||
if (This->filter.state == State_Running)
|
if (This->filter.state == State_Running)
|
||||||
goto out;
|
goto out;
|
||||||
if (This->pInputPin->pin.pConnectedTo)
|
This->filter.rtStreamStart = tStart;
|
||||||
|
QualityControlRender_Start(&This->qcimpl, tStart);
|
||||||
|
if (This->pInputPin->pin.pConnectedTo && (This->filter.state == State_Stopped || !This->pInputPin->end_of_stream))
|
||||||
{
|
{
|
||||||
if (This->filter.state == State_Stopped)
|
if (This->filter.state == State_Stopped)
|
||||||
{
|
{
|
||||||
This->pInputPin->end_of_stream = 0;
|
|
||||||
ResetEvent(This->hEvent);
|
ResetEvent(This->hEvent);
|
||||||
VideoRenderer_AutoShowWindow(This);
|
VideoRenderer_AutoShowWindow(This);
|
||||||
|
This->pInputPin->end_of_stream = 0;
|
||||||
}
|
}
|
||||||
SetEvent(This->blocked);
|
SetEvent(This->blocked);
|
||||||
|
|
||||||
This->filter.rtStreamStart = tStart;
|
|
||||||
This->filter.state = State_Running;
|
|
||||||
QualityControlRender_Start(&This->qcimpl, tStart);
|
|
||||||
} else if (This->filter.filterInfo.pGraph) {
|
} else if (This->filter.filterInfo.pGraph) {
|
||||||
IMediaEventSink *pEventSink;
|
IMediaEventSink *pEventSink;
|
||||||
hr = IFilterGraph_QueryInterface(This->filter.filterInfo.pGraph, &IID_IMediaEventSink, (LPVOID*)&pEventSink);
|
hr = IFilterGraph_QueryInterface(This->filter.filterInfo.pGraph, &IID_IMediaEventSink, (LPVOID*)&pEventSink);
|
||||||
|
|
Loading…
Reference in New Issue