Module: wine Branch: master Commit: 0c760ef70de7be47684de82fcd5dc7e71aeb3e22 URL: https://gitlab.winehq.org/wine/wine/-/commit/0c760ef70de7be47684de82fcd5dc7e...
Author: Rémi Bernon rbernon@codeweavers.com Date: Wed May 17 14:23:37 2023 +0200
winegstreamer: Forbid vaapidecodebin when looking for a specific element.
This will eventually fallback to vaapih264dec and similar decoders if VA-API plugins are indeed available.
---
dlls/winegstreamer/unixlib.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/winegstreamer/unixlib.c b/dlls/winegstreamer/unixlib.c index 6ffd41e9712..6ed38260536 100644 --- a/dlls/winegstreamer/unixlib.c +++ b/dlls/winegstreamer/unixlib.c @@ -101,6 +101,16 @@ GstElement *find_element(GstElementFactoryListType type, GstCaps *src_caps, GstC for (tmp = transforms; tmp != NULL && element == NULL; tmp = tmp->next) { name = gst_plugin_feature_get_name(GST_PLUGIN_FEATURE(tmp->data)); + + if (!strcmp(name, "vaapidecodebin")) + { + /* vaapidecodebin adds asynchronicity which breaks wg_transform synchronous drain / flush + * requirements. Ignore it and use VA-API decoders directly instead. + */ + GST_WARNING("Ignoring vaapidecodebin decoder."); + continue; + } + if (!(element = gst_element_factory_create(GST_ELEMENT_FACTORY(tmp->data), NULL))) GST_WARNING("Failed to create %s element.", name); }