Commit ce9a42e8 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Enable wg_parser streams on creation.

This patch is motivated by Obduction, which creates a Media Foundation source and leaves it open arbitrarily long before actually reading samples from it. Without this patch, we unnecessarily waste CPU, and may reduce graphical performance by taking CPU time that would otherwise be used on performance-critical threads. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ed2c300d
......@@ -1293,6 +1293,13 @@ static NTSTATUS wg_parser_connect(void *args)
pthread_cond_wait(&parser->init_cond, &parser->mutex);
}
}
/* Now that we're fully initialized, enable the stream so that further
* samples get queued instead of being discarded. We don't actually need
* the samples (in particular, the frontend should seek before
* attempting to read anything), but we don't want to waste CPU time
* trying to decode them. */
stream->enabled = true;
}
pthread_mutex_unlock(&parser->mutex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment