]> git.sesse.net Git - vlc/commitdiff
Fixed spu decoder when input rate is not the default value.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 10 Sep 2008 20:42:36 +0000 (22:42 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 10 Sep 2008 20:42:36 +0000 (22:42 +0200)
modules/codec/spudec/parse.c

index aeb7c91a4f8862539a45936f6ae356a9767b534c..de175a3e74831ec8f9d95e366daf6bebdfeb1eb1 100644 (file)
@@ -33,6 +33,7 @@
 #include <vlc_common.h>
 #include <vlc_vout.h>
 #include <vlc_codec.h>
+#include <vlc_input.h>
 
 #include "spudec.h"
 
@@ -172,9 +173,8 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t *p_spu,
 
             /* Get the control sequence date */
             date = (mtime_t)GetWBE( &p_sys->buffer[i_index] ) * 11000;
-            /* FIXME How to access i_rate
-                    * p_spudec->bit_stream.p_pes->i_rate / DEFAULT_RATE;
-            */
+            if( p_sys->i_rate )
+                date = date * p_sys->i_rate / INPUT_RATE_DEFAULT;
 
             /* Next offset */
             i_cur_seq = i_index;