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>
This commit is contained in:
parent
4bfd42baff
commit
d03cf6ceaa
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue