[vlc-devel] [PATCH] Fix a regression introduced by the previous commit

Mathieu Sonet chjirpa at free.fr
Tue Dec 23 23:07:29 CET 2008


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.

---
 modules/demux/vobsub.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c
index 13802ba..3b90e2d 100644
--- a/modules/demux/vobsub.c
+++ b/modules/demux/vobsub.c
@@ -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;
-- 
1.6.0.6




More information about the vlc-devel mailing list