[vlc-commits] codec: ttml: fallback on non namespaced id

Francois Cartegnie git at videolan.org
Wed Dec 20 15:19:09 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 20 15:18:12 2017 +0100| [34e4a418daaee7f2766559e2a73ccea0322f02f7] | committer: Francois Cartegnie

codec: ttml: fallback on non namespaced id

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=34e4a418daaee7f2766559e2a73ccea0322f02f7
---

 modules/codec/ttml/substtml.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index 24f85fda24..0b04b916df 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -249,6 +249,8 @@ static tt_node_t * FindNode( tt_node_t *p_node, const char *psz_nodename,
         if( psz_id != NULL )
         {
             char *psz = vlc_dictionary_value_for_key( &p_node->attr_dict, "xml:id" );
+            if( !psz ) /* People can't do xml properly */
+                psz = vlc_dictionary_value_for_key( &p_node->attr_dict, "id" );
             if( psz && !strcmp( psz, psz_id ) )
                 return p_node;
         }



More information about the vlc-commits mailing list