]> git.sesse.net Git - vlc/commitdiff
Tentative de fix pour le segfault du d�codeur (qui est en fait une erreur
authorChristophe Massiot <massiot@videolan.org>
Thu, 27 Jan 2000 23:12:03 +0000 (23:12 +0000)
committerChristophe Massiot <massiot@videolan.org>
Thu, 27 Jan 2000 23:12:03 +0000 (23:12 +0000)
du parseur).

src/video_parser/vpar_blocks.c

index 05d914c53ffb156c0d0c55a6e10f2ea1e8f6a939..1e9aa21e1525958d2b81be7c7fd8177a52179947 100644 (file)
@@ -1863,7 +1863,9 @@ static __inline__ void PictureData( vpar_thread_t * p_vpar, int i_mb_base,
     u32         i_dummy;
 
     NextStartCode( p_vpar );
-    while( i_mb_address+i_mb_base < p_vpar->sequence.i_mb_size
+    while( (i_coding_type != I_CODING_TYPE || i_coding_type != D_CODING_TYPE
+             || !p_vpar->picture.b_error)
+           && i_mb_address+i_mb_base < p_vpar->sequence.i_mb_size
            && !p_vpar->b_die )
     {
         if( ((i_dummy = ShowBits( &p_vpar->bit_stream, 32 ))
@@ -1885,7 +1887,8 @@ static __inline__ void PictureData( vpar_thread_t * p_vpar, int i_mb_base,
     /* Try to recover from error. If we missed less than half the
      * number of macroblocks of the picture, mark the missed ones
      * as skipped. */
-    if( p_vpar->picture.b_error &&
+    if( (i_coding_type == P_CODING_TYPE || i_coding_type == B_CODING_TYPE)
+        && p_vpar->picture.b_error &&
         ( (i_mb_address-i_mb_base) > (p_vpar->sequence.i_mb_size >> 1)
            || (i_structure != FRAME_STRUCTURE
                && (i_mb_address-i_mb_base) > (p_vpar->sequence.i_mb_size >> 2) ) ) )