+ else
+ {
+ msg_Warn( p_demux, "reading timestamp failed" );
+ }
+ }
+ else if( !strncasecmp( line, "delay:", 6 ) )
+ {
+ /*
+ * delay: [sign]hh:mm:ss:mss
+ */
+ int h, m, s, ms, count = 0;
+ int i_sign = 1;
+ int64_t i_gap = 0;
+
+ if( p_sys->i_tracks > 0 &&
+ sscanf( line, "%*celay: %d%n:%d:%d:%d",
+ &h, &count, &m, &s, &ms ) >= 4 )
+ {
+ vobsub_track_t *current_tk = &p_sys->track[p_sys->i_tracks - 1];
+ if( line[count-3] == '-' )
+ {
+ i_sign = -1;
+ h = -h;
+ }
+ i_gap = (int64_t) ( h * 3600*1000 +
+ m * 60*1000 +
+ s * 1000 +
+ ms ) * 1000;
+
+ current_tk->i_delay = current_tk->i_delay + (i_gap * i_sign);
+ msg_Dbg( p_demux, "sign: %+d gap: %+"PRId64" global delay: %+"PRId64"",
+ i_sign, i_gap, current_tk->i_delay );
+ }
+ else
+ {
+ msg_Warn( p_demux, "reading delay failed" );
+ }