This avoids issues with writing dummy data first, then having
to come back and write correct data later. Doing so prevents
the muxed stream from being actually streamable.
https://bugzilla.gnome.org/show_bug.cgi?id=712134
case GST_MATROSKA_TRACK_TYPE_SUBTITLE:{
gpointer buf;
+ /* If codec_id and codec data are already known, we can write
+ them now, as for audio/video */
+ if (context->codec_id && context->codec_priv)
+ break;
+
context->pos = ebml->pos;
+
/* CodecID is mandatory ... */
gst_ebml_write_ascii (ebml, GST_MATROSKA_ID_CODECID, "S_SUB_UNKNOWN");
/* reserve space */