transcriberbin: multiple (translation?) languages causes critical and fails to start
The pipeline: gst-launch-1.0 transcriberbin latency=10000 mux-method=cea708 cc-caps=closedcaption/x-cea-708,format=cdp name=t translation-languages="languages,transcript=708_1,es=708_2" filesrc location=/path/to/file ! decodebin name=d d. ! videoconvert ! t.sink_video d. ! queue ! audioconvert ! t.sink_audio t.src_audio ! queue max-size-time=10000000000 max-size-bytes=0 max-size-buffers=0 ! pulsesink t.src_video ! queue max-size-time=5000000000 max-size-bytes=0 max-size-buffers=0 ! cea708overlay service=2 ! videoconvert ! glimagesink
- Produces a critical:
(gst-launch-1.0:212081): GStreamer-CRITICAL **: 19:14:57.666: Padname src is not unique in element bin0, not adding
(gdb) bt
#0 0x00007ffff7d4e368 in g_logv () at /lib64/libglib-2.0.so.0
#1 0x00007ffff7d4e5d3 in g_log () at /lib64/libglib-2.0.so.0
#2 0x00007ffff7ed0a41 in gst_element_add_pad (element=0x6e6ff0, pad=0x89a950) at ../subprojects/gstreamer/gst/gstelement.c:809
#3 0x00007fffe966c3f0 in gstreamer::auto::element::ElementExt::add_pad<gstreamer::auto::bin::Bin, gstreamer::auto::ghost_pad::GhostPad> (self=<optimized out>, pad=<optimized out>)
at /home/matt/.cargo/git/checkouts/gstreamer-rs-79e52a2d27eb91a3/1b537c1/gstreamer/src/auto/element.rs:74
#4 0x00007fffe96ecf1f in gstrsclosedcaption::transcriberbin::imp::TranscriberBin::link_input_audio_stream (self=<optimized out>, pad_name=..., pad_state=<optimized out>, state=<optimized out>)
at video/closedcaption/src/transcriberbin/imp.rs:305
#5 0x00007fffe96f9abc in gstrsclosedcaption::transcriberbin::imp::TranscriberBin::construct_internal_bin (self=0x8f1910, state=<optimized out>) at video/closedcaption/src/transcriberbin/imp.rs:426
#6 gstrsclosedcaption::transcriberbin::imp::{impl#4}::constructed (self=0x8f1910) at video/closedcaption/src/transcriberbin/imp.rs:1413
#7 0x00007ffff7cb0fda in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
#8 0x00007ffff7cb2446 in g_object_new_with_properties () at /lib64/libgobject-2.0.so.0
...
- fails to start
0:00:00.130564747 231486 0x1e27ab0 DEBUG transcriberbin video/closedcaption/src/transcriberbin/imp.rs:1861:<gstrsclosedcaption::transcriberbin::imp::TranscriberSinkPad as glib::subclass::object::ObjectImpl>::set_property:<'':sink_audio> Updated translation-languages Some(Structure(languages { transcript: (gchararray) "708_1", es: (gchararray) "708_2" }))
0:00:00.131981698 231486 0x1e27ab0 DEBUG transcriberbin video/closedcaption/src/transcriberbin/imp.rs:319:gstrsclosedcaption::transcriberbin::imp::TranscriberBin::construct_transcription_bin:<t> Building transcription bin
0:00:00.132194962 231486 0x1e27ab0 DEBUG transcriberbin video/closedcaption/src/transcriberbin/imp.rs:236:gstrsclosedcaption::transcriberbin::imp::TranscriberBin::link_input_audio_stream:<t> Linking input audio stream sink_audio
(gst-launch-1.0:231486): GStreamer-CRITICAL **: 20:09:07.105: Padname src is not unique in element bin0, not adding
0:00:00.132649221 231486 0x1e27ab0 ERROR transcriberbin video/closedcaption/src/transcriberbin/imp.rs:1416:<gstrsclosedcaption::transcriberbin::imp::TranscriberBin as glib::subclass::object::ObjectImpl>::constructed: Failed to build internal bin: Failed to add pad
ERROR: from element /GstPipeline:pipeline0/GstTranscriberBin:t: GStreamer encountered a general stream error.
Additional debug info:
video/closedcaption/src/transcriberbin/imp.rs(1698): <gstrsclosedcaption::transcriberbin::imp::TranscriberBin as gstreamer::subclass::element::ElementImpl>::change_state (): /GstPipeline:pipeline0/GstTranscriberBin:t:
Can't change state with no state
ERROR: pipeline doesn't want to preroll.
If only a single language is used in transcriberbin
's translation-languages
property, then this does not occur.
This a regression from !1546 (merged)
cc @meh