[PATCH v2 1/4] winegstreamer: Advertise support for fast forward and slow motion.

Giovanni Mascellani gmascellani at codeweavers.com
Fri May 28 02:50:46 CDT 2021


Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
 dlls/winegstreamer/media_source.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 90efc9aaed2..3b7233ac2b5 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -933,7 +933,7 @@ static HRESULT WINAPI media_source_rate_support_GetSlowestRate(IMFRateSupport *i
 {
     TRACE("%p, %d, %d, %p.\n", iface, direction, thin, rate);
 
-    *rate = direction == MFRATE_FORWARD ? 1.0f : -1.0f;
+    *rate = 0.0f;
 
     return S_OK;
 }
@@ -942,14 +942,14 @@ static HRESULT WINAPI media_source_rate_support_GetFastestRate(IMFRateSupport *i
 {
     TRACE("%p, %d, %d, %p.\n", iface, direction, thin, rate);
 
-    *rate = direction == MFRATE_FORWARD ? 1.0f : -1.0f;
+    *rate = direction == MFRATE_FORWARD ? 1e6f : -1e6f;
 
     return S_OK;
 }
 
 static HRESULT WINAPI media_source_rate_support_IsRateSupported(IMFRateSupport *iface, BOOL thin, float rate, float *nearest_support_rate)
 {
-    const float supported_rate = rate >= 0.0f ? 1.0f : -1.0f;
+    const float supported_rate = max(min(rate, 1e6f), -1e6f);
 
     TRACE("%p, %d, %f, %p.\n", iface, thin, rate, nearest_support_rate);
 
-- 
2.32.0.rc0




More information about the wine-devel mailing list