winegstreamer: Require media source's IMFByteStream to be seekable.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c528ef47eb
commit
964cf9cfce
|
@ -1235,6 +1235,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||||
|
|
||||||
struct media_source *object = heap_alloc_zero(sizeof(*object));
|
struct media_source *object = heap_alloc_zero(sizeof(*object));
|
||||||
IMFStreamDescriptor **descriptors = NULL;
|
IMFStreamDescriptor **descriptors = NULL;
|
||||||
|
DWORD bytestream_caps;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -1242,6 +1243,15 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||||
if (!object)
|
if (!object)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
if (FAILED(hr = IMFByteStream_GetCapabilities(bytestream, &bytestream_caps)))
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
if (!(bytestream_caps & MFBYTESTREAM_IS_SEEKABLE))
|
||||||
|
{
|
||||||
|
FIXME("Non-seekable bytestreams not supported.\n");
|
||||||
|
return MF_E_BYTESTREAM_NOT_SEEKABLE;
|
||||||
|
}
|
||||||
|
|
||||||
object->IMFMediaSource_iface.lpVtbl = &IMFMediaSource_vtbl;
|
object->IMFMediaSource_iface.lpVtbl = &IMFMediaSource_vtbl;
|
||||||
object->async_commands_callback.lpVtbl = &source_async_commands_callback_vtbl;
|
object->async_commands_callback.lpVtbl = &source_async_commands_callback_vtbl;
|
||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
|
|
Loading…
Reference in New Issue