[vlc-commits] Use timecodescale to compute subtitle duration

Denis Charmet git at videolan.org
Wed Nov 14 11:11:17 CET 2012


vlc | branch: master | Denis Charmet <typx at dinauz.org> | Tue Nov 13 22:01:01 2012 +0100| [c6c7052fdf46e57139f20453d24854fb7a9e1b22] | committer: Jean-Baptiste Kempf

Use timecodescale to compute subtitle duration

Fix #2702

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/mkv/mkv.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 6d9ab63..6834367 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -641,7 +641,7 @@ msg_Dbg( p_demux, "block i_dts: %"PRId64" / i_pts: %"PRId64, p_block->i_dts, p_b
 #endif
         if( strcmp( tk->psz_codec, "S_VOBSUB" ) )
         {
-            p_block->i_length = i_duration * 1000;
+            p_block->i_length = i_duration * tk-> f_timecodescale * (double) p_segment->i_timescale / 1000.0;
         }
 
         /* FIXME remove when VLC_TS_INVALID work is done */



More information about the vlc-commits mailing list