[vlc-devel] [PATCH 7/8] codec/schroedinger: don't bother doing any complicated timestamp interpolation

davidf+nntp at woaf.net davidf+nntp at woaf.net
Fri Mar 27 21:37:56 CET 2009


From: David Flynn <davidf at rd.bbc.co.uk>

The packetizer does a far more thorough job of handling the different
timestamp representations used by vlc

Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
---
 modules/codec/schroedinger.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index 6e22f17..83409ed 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -290,7 +290,6 @@ static void CloseDecoder( vlc_object_t *p_this )
 static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
-    uint32_t u_pnum;
 
     if( !pp_block ) return NULL;
 
@@ -356,7 +355,6 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 
         case SCHRO_DECODER_OK: {
             SchroTag *p_tag = schro_decoder_get_picture_tag( p_sys->p_schro );
-            u_pnum = schro_decoder_get_picture_number( p_sys->p_schro );
             p_schroframe = schro_decoder_pull( p_sys->p_schro );
             if( !p_schroframe->priv )
             {
@@ -369,23 +367,20 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
             p_pic = ((struct picture_free_t*) p_schroframe->priv)->p_pic;
             p_schroframe->priv = NULL;
 
-            /* solve presentation time stamp for picture.  If this picture
-             * was not tagged with a pts when presented to decoder, interpolate
-             * one
-             * This means no need to set p_pic->b_force, as we have a pts on
-             * each picture */
             if( p_tag )
             {
                 /* free is handled by schro_frame_unref */
                 p_pic->date = *(mtime_t*) p_tag->value;
                 schro_tag_free( p_tag );
-                msg_Err(p_dec, "pts out: %"PRId64, p_pic->date);
             }
             else if( p_sys->i_lastpts >= 0 )
             {
+                /* NB, this shouldn't happen since the packetizer does a
+                 * very thorough job of inventing timestamps.  The
+                 * following is just a very rough fall back incase packetizer
+                 * is missing. */
+                /* maybe it would be better to set p_pic->b_force ? */
                 p_pic->date = p_sys->i_lastpts + p_sys->i_frame_pts_delta;
-                /* fixme */
-                msg_Err(p_dec, "no pts");
             }
             p_sys->i_lastpts = p_pic->date;
 
-- 
1.5.6.5




More information about the vlc-devel mailing list