]> git.sesse.net Git - vlc/commitdiff
Use timecodescale to compute subtitle duration
authorDenis Charmet <typx@dinauz.org>
Tue, 13 Nov 2012 21:01:01 +0000 (22:01 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 14 Nov 2012 10:10:20 +0000 (11:10 +0100)
Fix #2702

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/mkv.cpp

index 6d9ab63d48c4d7583fcc056114e79a7e63348bc1..6834367f0a7e6262fe98ec30dd1eb850b934cc37 100644 (file)
@@ -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 */