winegstreamer: Avoid passing a NULL buffer to wg_parser_push_data() in the case of a zero-length read.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
59997c355f
commit
585acfa041
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue