[vlc-commits] demux: ttml: send absolute timings

Francois Cartegnie git at videolan.org
Fri Jan 20 21:30:06 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jan 19 16:15:59 2017 +0100| [545f5134576477fe96353ebe2ff9b22487c5ac19] | committer: Francois Cartegnie

demux: ttml: send absolute timings

as no one agrees and ebu uses absolute timings

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

 modules/demux/ttml.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 32a3090..7e21d0b 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -85,8 +85,7 @@ static char *tt_genTiming( int64_t i_time )
     return psz;
 }
 
-static void tt_node_AttributesToText( struct vlc_memstream *p_stream, const tt_node_t* p_node,
-                                      int64_t i_splicetime )
+static void tt_node_AttributesToText( struct vlc_memstream *p_stream, const tt_node_t* p_node )
 {
     const vlc_dictionary_t* p_attr_dict = &p_node->attr_dict;
     for( int i = 0; i < p_attr_dict->i_size; ++i )
@@ -100,12 +99,12 @@ static void tt_node_AttributesToText( struct vlc_memstream *p_stream, const tt_n
             if( !strcmp(p_entry->psz_key, "begin") )
             {
                 if( p_node->timings.i_begin != -1 )
-                    psz_value = psz_alloc = tt_genTiming( p_node->timings.i_begin - i_splicetime );
+                    psz_value = psz_alloc = tt_genTiming( p_node->timings.i_begin );
             }
             else if( !strcmp(p_entry->psz_key, "end") )
             {
                 if( p_node->timings.i_end != -1 )
-                    psz_value = psz_alloc = tt_genTiming( p_node->timings.i_end - i_splicetime );
+                    psz_value = psz_alloc = tt_genTiming( p_node->timings.i_end );
             }
             else if( !strcmp(p_entry->psz_key, "dur") )
             {
@@ -142,7 +141,7 @@ static void tt_node_ToText( struct vlc_memstream *p_stream, const tt_basenode_t
         vlc_memstream_putc( p_stream, '<' );
         vlc_memstream_puts( p_stream, p_node->psz_node_name );
 
-        tt_node_AttributesToText( p_stream, p_node, i_playbacktime );
+        tt_node_AttributesToText( p_stream, p_node );
 
         if( tt_node_HasChild( p_node ) )
         {



More information about the vlc-commits mailing list