Module: wine Branch: master Commit: d03cf6ceaa908c8342f76dddb93a36da1e837faa URL: https://source.winehq.org/git/wine.git/?a=commit;h=d03cf6ceaa908c8342f76dddb...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Tue Dec 3 14:13:12 2019 +0300
mfplat: Set origin name attribute for stream based bytestreams too.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mfplat/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index fc656678ca..910b923542 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -3245,6 +3245,7 @@ HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **byt { struct bytestream *object; LARGE_INTEGER position; + STATSTG stat; HRESULT hr;
TRACE("%p, %p.\n", stream, bytestream); @@ -3271,6 +3272,16 @@ HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **byt position.QuadPart = 0; IStream_Seek(object->stream, position, STREAM_SEEK_SET, NULL);
+ if (SUCCEEDED(IStream_Stat(object->stream, &stat, 0))) + { + if (stat.pwcsName) + { + IMFAttributes_SetString(&object->attributes.IMFAttributes_iface, &MF_BYTESTREAM_ORIGIN_NAME, + stat.pwcsName); + CoTaskMemFree(stat.pwcsName); + } + } + *bytestream = &object->IMFByteStream_iface;
return S_OK;