winegstreamer: Avoid seeking past the end of an IMFByteStream.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51837 Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
585acfa041
commit
3efb72de5a
|
@ -639,6 +639,14 @@ static DWORD CALLBACK read_thread(void *arg)
|
||||||
else if (offset + size >= file_size)
|
else if (offset + size >= file_size)
|
||||||
size = file_size - offset;
|
size = file_size - offset;
|
||||||
|
|
||||||
|
/* Some IMFByteStreams (including the standard file-based stream) return
|
||||||
|
* an error when reading past the file size. */
|
||||||
|
if (!size)
|
||||||
|
{
|
||||||
|
wg_parser_push_data(source->wg_parser, data, 0);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!array_reserve(&data, &buffer_size, size, 1))
|
if (!array_reserve(&data, &buffer_size, size, 1))
|
||||||
{
|
{
|
||||||
free(data);
|
free(data);
|
||||||
|
|
Loading…
Reference in New Issue