Fix a regression introduced by the previous commit
authorMathieu Sonet <chjirpa@free.fr>
Tue, 23 Dec 2008 22:07:29 +0000 (23:07 +0100)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 24 Dec 2008 14:36:25 +0000 (16:36 +0200)
The previous commit confused i_line_count and i_line:
* txt->i_line_count contains the number of text lines.
* txt->i_line is the current offset in txt->line.

As a result no subtitles were available because TextGetLine always returned NULL.

Signed-off-by: Rémi Denis-Courmont <rdenis@simphalempin.com>
modules/demux/vobsub.c

index 13802ba..3b90e2d 100644 (file)
@@ -440,8 +440,8 @@ static int TextLoad( text_t *txt, stream_t *s )
         lines[n++] = psz;
     }
 
-    txt->i_line_count = 0;
-    txt->i_line       = n;
+    txt->i_line_count = n;
+    txt->i_line       = 0;
     txt->line         = lines;
 
     return VLC_SUCCESS;