1. Why does it sometimes work under Wine
I found that when Wine succeeds, we get the following entry logged: ``` gstnvdecoder.cpp:851:gst_nv_decoder_output_picture:<nvh264dec0> Negotiate again on reconfigure ``` This is a the result of the `GST_PAD_FLAG_NEED_RECONFIGURE` flag being set on the `nvh264dec0:src` pad when it tries to push a buffer. That flag is set when we link `decodebin0` to `deinterlace0`. But the pipeline processing begins as soon as `decodebin0` finishes linking internally. So the order in which the reconfigure flag is set and when a buffer is sent is indeterminable (thus sometimes it works, sometimes it doesn't).
2. Why does it always work with `gst-launch-1.0`
The simple answer is timing. If I apply the following patch: [gstreamer.patch](/uploads/8c5dd45b70be7f4fda8957daf53cb04c/gstreamer.patch) then `gst-launch-1.0` fails 100% of the time. This patch just delays the setting of the reconfigure flag by 10ms. However, even with this delay, when this MR is applied to Wine, Wine will succeed 100% of the time (as it has no need to reconfigure). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7823#note_101236