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));
|
||||
IMFStreamDescriptor **descriptors = NULL;
|
||||
DWORD bytestream_caps;
|
||||
unsigned int i;
|
||||
HRESULT hr;
|
||||
int ret;
|
||||
|
@ -1242,6 +1243,15 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
|||
if (!object)
|
||||
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->async_commands_callback.lpVtbl = &source_async_commands_callback_vtbl;
|
||||
object->ref = 1;
|
||||
|
|
Loading…
Reference in New Issue