Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/media_source.c | 7 +++++-- dlls/winegstreamer/quartz_parser.c | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c index 703bdd7c57d..dab85e4689d 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -613,9 +613,12 @@ static DWORD CALLBACK read_thread(void *arg) { struct media_source *source = arg; IMFByteStream *byte_stream = source->byte_stream; - size_t buffer_size = 0; + size_t buffer_size = 4096; uint64_t file_size; - void *data = NULL; + void *data; + + if (!(data = malloc(buffer_size))) + return 0;
IMFByteStream_GetLength(byte_stream, &file_size);
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index b6655d5da3c..6d79d2ef129 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -786,9 +786,12 @@ static DWORD CALLBACK read_thread(void *arg) { struct parser *filter = arg; LONGLONG file_size, unused; - size_t buffer_size = 0; + size_t buffer_size = 4096; void *data = NULL;
+ if (!(data = malloc(buffer_size))) + return 0; + IAsyncReader_Length(filter->reader, &file_size, &unused);
TRACE("Starting read thread for filter %p.\n", filter);