]> git.sesse.net Git - vlc/commitdiff
codec/schrodinger: don't tag frames with missing pts
authorDavid Flynn <davidf@rd.bbc.co.uk>
Thu, 7 May 2009 12:47:37 +0000 (12:47 +0000)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 7 May 2009 15:36:30 +0000 (18:36 +0300)
timestamp will be interpolated at output of decoder instead.

Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/codec/schroedinger.c

index d38028057480be2cca1948999da102277f0c596f..d854f573170eff9187bdc1093eb8972580bd1dc3 100644 (file)
@@ -314,11 +314,13 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         p_schrobuffer = schro_buffer_new_with_data( p_block->p_buffer, p_block->i_buffer );
         p_schrobuffer->free = SchroBufferFree;
         p_schrobuffer->priv = p_block;
-        mtime_t *p_pts = malloc( sizeof(*p_pts) );
-        if( p_pts ) {
-            *p_pts = p_block->i_pts;
-            /* if this call fails, p_pts is freed automatically */
-            p_schrobuffer->tag = schro_tag_new( p_pts, free );
+        if( p_block->i_pts != VLC_TS_INVALID ) {
+            mtime_t *p_pts = malloc( sizeof(*p_pts) );
+            if( p_pts ) {
+                *p_pts = p_block->i_pts;
+                /* if this call fails, p_pts is freed automatically */
+                p_schrobuffer->tag = schro_tag_new( p_pts, free );
+            }
         }
 
         /* this stops the same block being fed back into this function if