mfreadwrite: Return sample timestamp from ReadSample().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Nikolay Sivov 2019-04-29 14:40:03 +03:00 committed by Alexandre Julliard
parent 4837234e84
commit 2be769d648
1 changed files with 9 additions and 0 deletions

View File

@ -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;