Commit d03cf6ce authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplat: Set origin name attribute for stream based bytestreams too.

parent 4bfd42ba
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment