Fixed subtitle duration when rate != default.
[vlc.git] / modules / codec / telx.c
index dbeda2d..3e6a477 100644 (file)
@@ -453,8 +453,11 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
     char psz_line[256];
     int i, total;
 
-    if( pp_block == NULL || *pp_block == NULL ) return NULL;
+    if( pp_block == NULL || *pp_block == NULL )
+        return NULL;
     p_block = *pp_block;
+    if( p_block->i_rate != 0 )
+        p_block->i_length = p_block->i_length * p_block->i_rate / INPUT_RATE_DEFAULT;
     *pp_block = NULL;
 
     dbg((p_dec, "start of telx packet with header %2x\n",