[PATCH 4/4] winegstreamer: Commit allocator before pausing the stream.
Anton Baskanov
baskanov at gmail.com
Mon Jun 8 13:00:55 CDT 2020
Signed-off-by: Anton Baskanov <baskanov at gmail.com>
---
Otherwise the streaming thread sometimes fails to allocate a sample.
---
dlls/winegstreamer/gstdemux.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 299a7ddf56..7c38e421f9 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1391,6 +1391,15 @@ static HRESULT gstdemux_init_stream(struct strmbase_filter *iface)
if (!filter->container)
return VFW_E_NOT_CONNECTED;
+ for (i = 0; i < filter->source_count; ++i)
+ {
+ if (SUCCEEDED(pin_hr = BaseOutputPinImpl_Active(&filter->sources[i]->pin)))
+ hr = pin_hr;
+ }
+
+ if (FAILED(hr))
+ return hr;
+
if (filter->no_more_pads_event)
ResetEvent(filter->no_more_pads_event);
@@ -1422,11 +1431,6 @@ static HRESULT gstdemux_init_stream(struct strmbase_filter *iface)
stop_type, seeking->llStop * 100));
}
- for (i = 0; i < filter->source_count; ++i)
- {
- if (SUCCEEDED(pin_hr = BaseOutputPinImpl_Active(&filter->sources[i]->pin)))
- hr = pin_hr;
- }
return hr;
}
--
2.17.1
More information about the wine-devel
mailing list