[vlc-devel] commit: Fix a regression introduced by the previous commit (Mathieu Sonet )

git version control git at videolan.org
Wed Dec 24 15:37:40 CET 2008


vlc | branch: master | Mathieu Sonet <chjirpa at free.fr> | Tue Dec 23 23:07:29 2008 +0100| [6b9013dbfeaa4bad2f984f25663934cccd45e091] | committer: Rémi Denis-Courmont 

Fix a regression introduced by the previous commit

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 at simphalempin.com>

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

 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;




More information about the vlc-devel mailing list