Signed-off-by: Derek Lesho dlesho@codeweavers.com --- v3: Output FIXME message when failing to create source because of non-seekable bytestream. --- dlls/winegstreamer/media_source.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c index dbc656a24da..545c94b4001 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -1232,6 +1232,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; @@ -1239,6 +1240,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;