Skip to content
Snippets Groups Projects
Commit 4853f65c authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard
Browse files

winegstreamer: Do not block forever if EOS races with command queue.


Currently, the winegstreamer media source checks for EOS when
RequestSample() is called, but doesn't handle the cases when EOS
is detected between the RequestSample() call and the moment when
the request is popped from the command queue and serviced. This
can result in the media source waiting forever for a sample and
get stuck.

This commit fixes the bug by adding a check for EOS in
wait_for_event().

This commit fixes Medieval Dynasty hanging on developer logos on
the Steam Deck.

Signed-off-by: default avatarGiovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: default avatarZebediah Figura <zfigura@codeweavers.com>
Signed-off-by: default avatarNikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent 64b2ce4b
No related branches found
No related tags found
No related merge requests found
......@@ -535,6 +535,12 @@ static void wait_on_sample(struct media_stream *stream, IUnknown *token)
TRACE("%p, %p\n", stream, token);
if (stream->eos)
{
IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, MEError, &GUID_NULL, MF_E_END_OF_STREAM, &empty_var);
return;
}
for (;;)
{
if (!wg_parser_stream_get_event(stream->wg_stream, &event))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment