Nikolay Sivov : mfreadwrite: Return sample timestamp from ReadSample().

Alexandre Julliard julliard at winehq.org
Mon Apr 29 16:08:50 CDT 2019


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Apr 29 14:40:03 2019 +0300

mfreadwrite: Return sample timestamp from ReadSample().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mfreadwrite/main.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/mfreadwrite/main.c b/dlls/mfreadwrite/main.c
index e396dcd..aeb86db 100644
--- a/dlls/mfreadwrite/main.c
+++ b/dlls/mfreadwrite/main.c
@@ -850,6 +850,15 @@ static HRESULT WINAPI src_reader_ReadSample(IMFSourceReader *iface, DWORD index,
         LeaveCriticalSection(&stream->cs);
 
         TRACE("Got sample %p.\n", *sample);
+
+        if (timestamp)
+        {
+            /* TODO: it's possible timestamp has to be set for some events.
+               For MEEndOfStream it's correct to return 0. */
+            *timestamp = 0;
+            if (*sample)
+                IMFSample_GetSampleTime(*sample, timestamp);
+        }
     }
 
     return S_OK;




More information about the wine-cvs mailing list