Commit 6b9013db authored by Mathieu Sonet's avatar Mathieu Sonet Committed by 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: default avatarRémi Denis-Courmont <rdenis@simphalempin.com>
parent 7f7c0d67
......@@ -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;
......
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