From 0e85973e94643fbbd09197b354f388f9242c8329 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Wed, 29 May 2024 17:01:17 +0200 Subject: [PATCH] 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: --- video/closedcaption/src/transcriberbin/imp.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/closedcaption/src/transcriberbin/imp.rs b/video/closedcaption/src/transcriberbin/imp.rs index f24b7c30..951cfe30 100644 --- a/video/closedcaption/src/transcriberbin/imp.rs +++ b/video/closedcaption/src/transcriberbin/imp.rs @@ -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() {