]> git.sesse.net Git - vlc/commitdiff
* modules/packetizer/mpegvideo.c: better fix.
authorGildas Bazin <gbazin@videolan.org>
Mon, 24 May 2004 19:00:37 +0000 (19:00 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 24 May 2004 19:00:37 +0000 (19:00 +0000)
modules/packetizer/mpegvideo.c

index fd69813a728d490d5093e39027be54f26bf56127..bc9c34e15824d16f32a44363c1cb61eff17a5867 100644 (file)
@@ -268,18 +268,10 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
 
             /* Get the new fragment and set the pts/dts */
             p_pic = block_New( p_dec, p_sys->i_offset );
+            block_BytestreamFlush( &p_sys->bytestream );
             p_pic->i_pts = p_sys->bytestream.p_block->i_pts;
             p_pic->i_dts = p_sys->bytestream.p_block->i_dts;
 
-            /* FIXME ? Should we flush the bytestream chain before ? */
-            if( p_sys->bytestream.p_block->i_buffer ==
-                p_sys->bytestream.i_offset &&
-                p_sys->bytestream.p_block->p_next )
-            {
-                p_pic->i_pts = p_sys->bytestream.p_block->p_next->i_pts;
-                p_pic->i_dts = p_sys->bytestream.p_block->p_next->i_dts;
-            }
-
             block_GetBytes( &p_sys->bytestream, p_pic->p_buffer,
                             p_pic->i_buffer );