[vlc-commits] ttml: fix DEMUX_GET_TIME at end-of-stream
Rémi Denis-Courmont
git at videolan.org
Fri Aug 21 19:14:26 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Aug 21 20:05:40 2015 +0300| [3ef51621b40313f49a40e78fc7f8c13de3050688] | committer: Rémi Denis-Courmont
ttml: fix DEMUX_GET_TIME at end-of-stream
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3ef51621b40313f49a40e78fc7f8c13de3050688
---
modules/demux/ttml.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index ba6b5dc..371ac2e 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -75,10 +75,10 @@ static int Control( demux_t* p_demux, int i_query, va_list args )
case DEMUX_GET_TIME:
pi64 = (int64_t*)va_arg( args, int64_t * );
if( p_sys->i_subtitle < p_sys->i_subtitles )
- {
*pi64 = p_sys->subtitle[p_sys->i_subtitle].i_start;
- return VLC_SUCCESS;
- }
+ else
+ *pi64 = p_sys->i_length;
+ return VLC_SUCCESS;
case DEMUX_SET_TIME:
i64 = (int64_t)va_arg( args, int64_t );
p_sys->i_subtitle = 0;
More information about the vlc-commits
mailing list