Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/mfreadwrite/reader.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/dlls/mfreadwrite/reader.c b/dlls/mfreadwrite/reader.c index be77e1c5b1d..2ac6f0810a1 100644 --- a/dlls/mfreadwrite/reader.c +++ b/dlls/mfreadwrite/reader.c @@ -87,7 +87,7 @@ struct media_stream struct stream_transform decoder; IMFVideoSampleAllocatorEx *allocator; IMFVideoSampleAllocatorNotify notify_cb; - unsigned int id; + DWORD id; unsigned int index; enum media_stream_state state; unsigned int flags; @@ -162,9 +162,9 @@ struct source_reader unsigned int first_audio_stream_index; unsigned int first_video_stream_index; unsigned int last_read_index; - unsigned int stream_count; + DWORD stream_count; unsigned int flags; - unsigned int queue; + DWORD queue; enum media_source_state source_state; struct media_stream *streams; struct list responses; @@ -368,8 +368,8 @@ static void source_reader_response_ready(struct source_reader *reader, struct st static void source_reader_copy_sample_buffer(IMFSample *src, IMFSample *dst) { IMFMediaBuffer *buffer; - unsigned int flags; LONGLONG time; + DWORD flags; HRESULT hr;
IMFSample_CopyAllItems(src, (IMFAttributes *)dst); @@ -1057,7 +1057,7 @@ static BOOL source_reader_get_read_result(struct source_reader *reader, struct m return !request_sample; }
-static HRESULT source_reader_get_next_selected_stream(struct source_reader *reader, unsigned int *stream_index) +static HRESULT source_reader_get_next_selected_stream(struct source_reader *reader, DWORD *stream_index) { unsigned int i, first_selected = ~0u, requests = ~0u; BOOL selected, stream_drained; @@ -1095,7 +1095,7 @@ static HRESULT source_reader_get_next_selected_stream(struct source_reader *read return first_selected == ~0u ? MF_E_MEDIA_SOURCE_NO_STREAMS_SELECTED : S_OK; }
-static HRESULT source_reader_get_stream_read_index(struct source_reader *reader, unsigned int index, unsigned int *stream_index) +static HRESULT source_reader_get_stream_read_index(struct source_reader *reader, unsigned int index, DWORD *stream_index) { BOOL selected; HRESULT hr; @@ -1814,7 +1814,8 @@ static HRESULT WINAPI src_reader_SetCurrentPosition(IMFSourceReader *iface, REFG { struct source_reader *reader = impl_from_IMFSourceReader(iface); struct source_reader_async_command *command; - unsigned int i, flags; + unsigned int i; + DWORD flags; HRESULT hr;
TRACE("%p, %s, %p.\n", iface, debugstr_guid(format), position); @@ -1871,8 +1872,8 @@ static HRESULT WINAPI src_reader_SetCurrentPosition(IMFSourceReader *iface, REFG static HRESULT source_reader_read_sample(struct source_reader *reader, DWORD index, DWORD flags, DWORD *actual_index, DWORD *stream_flags, LONGLONG *timestamp, IMFSample **sample) { - unsigned int actual_index_tmp; struct media_stream *stream; + DWORD actual_index_tmp; LONGLONG timestamp_tmp; DWORD stream_index; HRESULT hr = S_OK; @@ -1931,7 +1932,7 @@ static HRESULT source_reader_read_sample(struct source_reader *reader, DWORD ind }
static HRESULT source_reader_read_sample_async(struct source_reader *reader, unsigned int index, unsigned int flags, - unsigned int *actual_index, unsigned int *stream_flags, LONGLONG *timestamp, IMFSample **sample) + DWORD *actual_index, DWORD *stream_flags, LONGLONG *timestamp, IMFSample **sample) { struct source_reader_async_command *command; HRESULT hr; @@ -2166,7 +2167,7 @@ static const IMFSourceReaderVtbl srcreader_vtbl =
static DWORD reader_get_first_stream_index(IMFPresentationDescriptor *descriptor, const GUID *major) { - unsigned int count, i; + DWORD count, i; BOOL selected; HRESULT hr; GUID guid; @@ -2415,8 +2416,9 @@ static HRESULT bytestream_get_url_hint(IMFByteStream *stream, WCHAR const **url) { mp4vmagic, L".m4v", mp4mask }, }; unsigned char buffer[4 * sizeof(unsigned int)], pattern[4 * sizeof(unsigned int)]; - unsigned int i, j, length = 0, caps = 0; + unsigned int i, j, length = 0; IMFAttributes *attributes; + DWORD ulength, caps = 0; QWORD position; HRESULT hr;
@@ -2440,12 +2442,12 @@ static HRESULT bytestream_get_url_hint(IMFByteStream *stream, WCHAR const **url) if (FAILED(hr = IMFByteStream_GetCurrentPosition(stream, &position))) return hr;
- hr = IMFByteStream_Read(stream, buffer, sizeof(buffer), &length); + hr = IMFByteStream_Read(stream, buffer, sizeof(buffer), &ulength); IMFByteStream_SetCurrentPosition(stream, position); if (FAILED(hr)) return hr;
- if (length < sizeof(buffer)) + if (ulength < sizeof(buffer)) return S_OK;
for (i = 0; i < ARRAY_SIZE(url_hints); ++i) @@ -2468,9 +2470,9 @@ static HRESULT bytestream_get_url_hint(IMFByteStream *stream, WCHAR const **url) }
if (*url) - TRACE("Stream type guessed as %s from %s.\n", debugstr_w(*url), debugstr_an((char *)buffer, length)); + TRACE("Stream type guessed as %s from %s.\n", debugstr_w(*url), debugstr_an((char *)buffer, ulength)); else - WARN("Unrecognized content type %s.\n", debugstr_an((char *)buffer, length)); + WARN("Unrecognized content type %s.\n", debugstr_an((char *)buffer, ulength));
return S_OK; }