winegstreamer: Don't query or set GStreamer duration if the filter is stopped.

This check is not equivalent to the existence of "their_src" for the
MPEG-1 splitter, since that always exposes a source audio pin.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Zebediah Figura 2020-02-27 20:40:35 -06:00 committed by Alexandre Julliard
parent c6b852e3c3
commit 18bdaaaa26
1 changed files with 3 additions and 2 deletions

View File

@ -1841,7 +1841,8 @@ static HRESULT WINAPI GST_Seeking_GetCurrentPosition(IMediaSeeking *iface, REFER
mark_wine_thread();
if (!This->their_src) {
if (This->pin.pin.filter->state == State_Stopped)
{
*pos = This->seek.llCurrent;
TRACE("Cached value\n");
if (This->seek.llDuration)
@ -1892,7 +1893,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
return E_NOTIMPL;
hr = SourceSeekingImpl_SetPositions(iface, pCur, curflags, pStop, stopflags);
if (!This->their_src)
if (This->pin.pin.filter->state == State_Stopped)
return hr;
curtype = type_from_flags(curflags);