Reconnecting to an element that uses OpenGL does not work
When trying to replace an element in a pipeline, reconnecting to a part of a pipeline that has OpenGL components (from gst-plugins-base) will not work. To recreate, use the example code from the documentation: https://gstreamer.freedesktop.org/documentation/application-development/advanced/pipeline-manipulation.html?gi-language=c#changing-elements-in-a-pipeline and replace the xvimagesink with an glimagesink. The new element will not connect to the downstream elements and the program will exit with code -1.
Alternatively, the glupload, gldownload combined with an autovideosink can be used.
To observe this behavior, the program has to be compiled for and run on the Windows platform. This was observed on Windows 10 Pro 22H2 (Build 19045.4046). The very same program runs fine on Linux using the egl or glx platforms.