[PATCH v2 1/4] winegstreamer: Don't query or set GStreamer duration if the filter is stopped.

Zebediah Figura z.figura12 at gmail.com
Thu Feb 27 20:40:35 CST 2020


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

Fixes: 40a4c782b7f77534535dfa7bb2a97049026fef47
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/winegstreamer/gstdemux.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 488c9bd8a13..d469f2dbbff 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -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);
-- 
2.25.0




More information about the wine-devel mailing list