]> git.sesse.net Git - vlc/commitdiff
codec/schroedinger: remove ts hack, request packetizer
authorDavid Flynn <davidf@rd.bbc.co.uk>
Fri, 27 Mar 2009 20:37:52 +0000 (20:37 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 3 Apr 2009 09:10:02 +0000 (11:10 +0200)
Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/schroedinger.c

index 1f39df1a38f96ac7bbf7e8bc36b6d6494b1aede3..70a8f05a2da7ae43d0185fce788605c3265ee53b 100644 (file)
@@ -90,7 +90,6 @@ struct decoder_sys_t
     SchroDecoder *p_schro;
     SchroVideoFormat *p_format;
     struct picture_pts_t pts_tlb[PTS_TLB_SIZE];
-    int i_ts_resync_hack;
 };
 
 //#define TRACE
@@ -141,10 +140,12 @@ static int OpenDecoder( vlc_object_t *p_this )
     p_sys->p_format = NULL;
     p_sys->i_lastpts = -1;
     p_sys->i_frame_pts_delta = 0;
-    p_sys->i_ts_resync_hack = 0;
 
     ResetPTStlb(p_dec);
 
+    /* request packetizer */
+    p_dec->b_need_packetized = true;
+
     /* Set output properties */
     p_dec->fmt_out.i_cat = VIDEO_ES;
     p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
@@ -384,9 +385,6 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     if ( p_block ) do {
         /* prepare block for submission */
 
-        if (p_sys->i_ts_resync_hack && p_sys->i_ts_resync_hack--)
-            return NULL;
-
         if( !p_block->i_buffer ) {
             msg_Err( p_dec, "block is of zero size" );
             break;
@@ -404,10 +402,6 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 
             p_sys->i_lastpts = -1;
 
-            /* The ts layer manages to corrupt the next packet we are to receive
-             * Since schro has no sync support, we need to drop it */
-            p_sys->i_ts_resync_hack = 1;
-
             block_Release( p_block );
             *pp_block = NULL;
             return NULL;