ttmlparse: fix issues in aggregation of input TTML
The last commit to ttmlparse (!848 (merged)) broke the handling of TTML that is delivered as DASH segments. This can be demonstrated with the following command:
GST_TTML_AUTOPLUG=1 gst-play-1.0 http://rdmedia.bbc.co.uk/dash/ondemand/elephants_dream/1/client_manifest-one_representation_per_component.mpd
The reason is that the TTML documents within the ISOBMFF segments contain a linefeed (0xA) after the closing </tt>
tag. !848 (merged) searches for this closing tag to find whether a complete TTML file has been received and where it ends in the input; however, any trailing whitespace is then added to the start of the next TTML file to be parsed, which causes libxml2 to fail (it expects files to start with an XML declaration).
Additionally, the code in !848 (merged) searches the aggregated input for the last </tt>
tag. It should be looking for the first </tt>
tag, as there may be multiple complete TTML documents in the aggregated input, and the parser can handle only one TTML document at a time.
The commits in this MR fix these issues.
Merge request reports
Activity
added Regression label
- Resolved by Seungha Yang
@ao2 do you have any chance to check that this wouldn't break your use case?
assigned to @gstreamer-merge-bot
added 1.18 Maybe backport labels
mentioned in commit floobleflam/gst-plugins-bad@0db656c0
mentioned in commit floobleflam/gst-plugins-bad@9233cc19
added 269 commits
-
41677c47...bfb90710 - 267 commits from branch
gstreamer:master
- 9233cc19 - ttmlparse: Ensure only single TTML doc parsed
- 0db656c0 - ttmlparse: Handle whitespace before XML declaration
-
41677c47...bfb90710 - 267 commits from branch
assigned to @floobleflam and unassigned @gstreamer-merge-bot
assigned to @gstreamer-merge-bot and unassigned @floobleflam
mentioned in commit floobleflam/gst-plugins-bad@8df2314c
mentioned in commit floobleflam/gst-plugins-bad@d25be0d1
removed Maybe backport label
added Needs backport label
mentioned in commit tpm/gst-plugins-bad@2d362151
mentioned in commit tpm/gst-plugins-bad@89bf5622