Commit f508be5f authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

qasf: Configure WMReader stream format in asf_reader_init_stream.

parent 8d369f42
...@@ -208,6 +208,7 @@ static HRESULT asf_reader_init_stream(struct strmbase_filter *iface) ...@@ -208,6 +208,7 @@ static HRESULT asf_reader_init_stream(struct strmbase_filter *iface)
for (i = 0; i < filter->stream_count; ++i) for (i = 0; i < filter->stream_count; ++i)
{ {
struct asf_stream *stream = filter->streams + i; struct asf_stream *stream = filter->streams + i;
IWMOutputMediaProps *props;
if (!stream->source.pin.peer) if (!stream->source.pin.peer)
continue; continue;
...@@ -218,6 +219,22 @@ static HRESULT asf_reader_init_stream(struct strmbase_filter *iface) ...@@ -218,6 +219,22 @@ static HRESULT asf_reader_init_stream(struct strmbase_filter *iface)
break; break;
} }
if (FAILED(hr = IWMReader_GetOutputFormat(filter->reader, stream->index, 0, &props)))
{
WARN("Failed to get stream %u output format, hr %#lx\n", i, hr);
break;
}
hr = IWMOutputMediaProps_SetMediaType(props, (WM_MEDIA_TYPE *)&stream->source.pin.mt);
if (SUCCEEDED(hr))
hr = IWMReader_SetOutputProps(filter->reader, stream->index, props);
IWMOutputMediaProps_Release(props);
if (FAILED(hr))
{
WARN("Failed to set stream %u output format, hr %#lx\n", i, hr);
break;
}
if (FAILED(hr = IPin_NewSegment(stream->source.pin.peer, 0, 0, 1))) if (FAILED(hr = IPin_NewSegment(stream->source.pin.peer, 0, 0, 1)))
{ {
WARN("Failed to start stream %u new segment, hr %#lx\n", i, hr); WARN("Failed to start stream %u new segment, hr %#lx\n", i, hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment