mfreadwrite: Keep media stream id for event matching.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-04-09 13:45:08 +03:00 committed by Alexandre Julliard
parent eca601d7bb
commit 2d834c472d
1 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,7 @@ HRESULT WINAPI DllUnregisterServer(void)
struct media_stream struct media_stream
{ {
IMFMediaType *current; IMFMediaType *current;
DWORD id;
}; };
typedef struct source_reader typedef struct source_reader
@ -644,6 +645,9 @@ static HRESULT create_source_reader_from_source(IMFMediaSource *source, IMFAttri
if (FAILED(hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(object->descriptor, i, &selected, &sd))) if (FAILED(hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(object->descriptor, i, &selected, &sd)))
break; break;
if (FAILED(hr = IMFStreamDescriptor_GetStreamIdentifier(sd, &object->streams[i].id)))
WARN("Failed to get stream identifier, hr %#x.\n", hr);
hr = IMFStreamDescriptor_GetMediaTypeHandler(sd, &handler); hr = IMFStreamDescriptor_GetMediaTypeHandler(sd, &handler);
IMFStreamDescriptor_Release(sd); IMFStreamDescriptor_Release(sd);
if (FAILED(hr)) if (FAILED(hr))