Commit c12ab4a4 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* One more fix for vobsubs with negative times

parent 54722ef3
...@@ -582,7 +582,11 @@ static int ParseVobSubIDX( demux_t *p_demux ) ...@@ -582,7 +582,11 @@ static int ParseVobSubIDX( demux_t *p_demux )
{ {
subtitle_t *current_sub; subtitle_t *current_sub;
if( line[count-3] == '-' ) i_sign = -1; if( line[count-3] == '-' )
{
i_sign = -1;
h = -h;
}
i_start = (int64_t) ( h * 3600*1000 + i_start = (int64_t) ( h * 3600*1000 +
m * 60*1000 + m * 60*1000 +
s * 1000 + s * 1000 +
...@@ -612,7 +616,11 @@ static int ParseVobSubIDX( demux_t *p_demux ) ...@@ -612,7 +616,11 @@ static int ParseVobSubIDX( demux_t *p_demux )
if( sscanf( line, "delay: %d%n:%d:%d:%d", if( sscanf( line, "delay: %d%n:%d:%d:%d",
&h, &count, &m, &s, &ms ) >= 4 ) &h, &count, &m, &s, &ms ) >= 4 )
{ {
if( line[count-3] == '-' ) i_sign = -1; if( line[count-3] == '-' )
{
i_sign = -1;
h = -h;
}
i_gap = (int64_t) ( h * 3600*1000 + i_gap = (int64_t) ( h * 3600*1000 +
m * 60*1000 + m * 60*1000 +
s * 1000 + s * 1000 +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment