GNOME Bugzilla – Bug 781027
ttmlparse: Incorrectly filters untimed whitespace from content nodes
Last modified: 2017-04-09 07:44:29 UTC
Created attachment 349446 [details] Example TTML file demonstrating the issue. Significant whitespace in elements that don't have begin/end values should inherit timing from their parent, and if their parents have no timing, from the document's Root Temporal Extent. Currently, such whitespace is removed, which is not spec-compliant. The attached file demonstrates the problem. When this file is rendered, the whitespace resulting from the newlines and the indentation before each span should result in a single space with transparent background being rendered between each rendered span. Instead, the spans are rendered without any space between them. Example file can be run using this command: gst-launch-1.0 ttmlrender name=r videotestsrc pattern="gradient" ! video/x-raw,width=1280,height=720 ! autovideoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! r.video_sink filesrc blocksize=4294967295 location=test.xml ! ttmlparse ! r.text_sink r. ! ximagesink
Created attachment 349448 [details] [review] ttmlparse: don't filter out untimed whitespace Retain whitespace in content nodes and assign a Root Temporal Extent of 24 hours to any significant whitespace whose ancestors have no associated timing. ** Note: this should be applied on top of the patches in https://bugzilla.gnome.org/show_bug.cgi?id=780402 **
Attachment 349448 [details] pushed as b4d9d9d - ttmlparse: don't filter out untimed whitespace