[PATCH 1/5] strmbase: Allow NULL for time format in ConvertTimeFormat

Maarten Lankhorst m.b.lankhorst at gmail.com
Thu Nov 4 11:54:25 CDT 2010


---
 dlls/strmbase/seeking.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/strmbase/seeking.c b/dlls/strmbase/seeking.c
index 93fc6db..f03dde6 100644
--- a/dlls/strmbase/seeking.c
+++ b/dlls/strmbase/seeking.c
@@ -179,6 +179,11 @@ HRESULT WINAPI SourceSeekingImpl_GetCurrentPosition(IMediaSeeking * iface, LONGL
 
 HRESULT WINAPI SourceSeekingImpl_ConvertTimeFormat(IMediaSeeking * iface, LONGLONG * pTarget, const GUID * pTargetFormat, LONGLONG Source, const GUID * pSourceFormat)
 {
+    SourceSeeking *This = (SourceSeeking *)iface;
+    if (!pTargetFormat)
+        pTargetFormat = &This->timeformat;
+    if (!pSourceFormat)
+        pSourceFormat = &This->timeformat;
     if (IsEqualIID(pTargetFormat, &TIME_FORMAT_MEDIA_TIME) && IsEqualIID(pSourceFormat, &TIME_FORMAT_MEDIA_TIME))
     {
         *pTarget = Source;
-- 
1.7.1




More information about the wine-patches mailing list