Skip to content
Snippets Groups Projects
Commit 964cf9cf authored by Derek Lesho's avatar Derek Lesho Committed by Alexandre Julliard
Browse files

winegstreamer: Require media source's IMFByteStream to be seekable.

parent c528ef47
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment