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: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ed2c300d02
commit
ce9a42e8bd
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue