transcriberbin: fix regression with > 1 translation languages

By making sure to expose uniquely named pads on the inner transcription
bins.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/552
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1593>
This commit is contained in:
Mathieu Duponchelle 2024-05-29 17:01:17 +02:00 committed by GStreamer Marge Bot
parent 30252a1b2e
commit 0e85973e94

View file

@ -300,7 +300,9 @@ impl TranscriberBin {
channel.link_transcriber(&pad_state.transcriber)?;
let srcpad =
gst::GhostPad::with_target(&channel.bin.static_pad("src").unwrap()).unwrap();
gst::GhostPad::builder_with_target(&channel.bin.static_pad("src").unwrap()).unwrap()
.name(format!("src_{}", channel.language))
.build();
pad_state.transcription_bin.add_pad(&srcpad)?;
if state.ccmux.static_pad(&channel.ccmux_pad_name).is_none() {