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

Alexandre Julliard julliard at winehq.org
Fri Feb 28 13:54:39 CST 2020


Module: wine
Branch: master
Commit: 18bdaaaa2687d6423a479a968037c62b4b9cedbb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=18bdaaaa2687d6423a479a968037c62b4b9cedbb

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Feb 27 20:40:35 2020 -0600

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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 488c9bd8a1..d469f2dbbf 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);




More information about the wine-cvs mailing list