]> git.sesse.net Git - vlc/blobdiff - modules/codec/telx.c
Less memleaks in Qt interface.
[vlc] / modules / codec / telx.c
index dbeda2d8bfeaeb11e65025bb7afaadb01320a26a..e361760c46b0273fad893a0d9494d15629133009 100644 (file)
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
+#include <assert.h>
+#include <stdint.h>
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
-#include <assert.h>
-#include <stdint.h>
+#include <vlc_input.h>
 
 #include "vlc_vout.h"
 #include "vlc_bits.h"
@@ -453,8 +454,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",