Zebediah Figura (@zfigura) commented about dlls/winegstreamer/wg_parser.c:
+ + if (parser->unlimited_buffering) + { + g_object_set(decodebin, "max-size-buffers", G_MAXUINT, NULL); + g_object_set(decodebin, "max-size-time", G_MAXUINT64, NULL); + g_object_set(decodebin, "max-size-bytes", G_MAXUINT, NULL); + } + g_signal_connect(decodebin, "pad-added", G_CALLBACK(pad_added_cb), parser); + g_signal_connect(decodebin, "pad-removed", G_CALLBACK(pad_removed_cb), parser); + g_signal_connect(decodebin, "autoplug-continue", G_CALLBACK(autoplug_continue_cb), parser); + g_signal_connect(decodebin, "autoplug-select", G_CALLBACK(autoplug_select_cb), parser); + g_signal_connect(decodebin, "no-more-pads", G_CALLBACK(no_more_pads_cb), parser); + + return decodebin; +} + I'm not sure I like using the same callbacks for both decodebins. pad-added does share a lot of code for postprocessing, but that could easily be a helper function. pad-removed isn't accounted for in this patch (and should be) and I think it needs to do something completely different for compressed and uncompressed elements. no-more-pads is small but can still afford to be duplicated.
Using separate callbacks for everything (except autoplug-select) strikes me as a bit architecturally clearer. It also has the benefit that get_stream_by_decodebin() is no longer needed. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2546#note_28530