changeset 142:300fea6ea86a

applied Walken's MB stuffing patch
author arpi_esp
date Sun, 18 Mar 2001 19:41:31 +0000
parents 0b6b7cad24ef
children 75d2740260e9
files libmpeg2/slice.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpeg2/slice.c	Sun Mar 18 19:27:28 2001 +0000
+++ b/libmpeg2/slice.c	Sun Mar 18 19:41:31 2001 +0000
@@ -976,7 +976,8 @@
 	    break;
 	default:	/* end of slice, or error */
 //	    printf("MB error: %d  \n",(UBITS (bit_buf, 11))); // FIXME!
-	    return 0;
+//	    return 0;
+	    return -1;
 	}
     }
 
@@ -1755,13 +1756,15 @@
 
 	NEEDBITS (bit_buf, bits, bit_ptr);
 
-	if (bit_buf & 0x80000000) {
+	if (0 /* FIXME */ && (bit_buf & 0x80000000)) {
 	    DUMPBITS (bit_buf, bits, 1);
 	} else {
 	    int mba_inc;
 
 	    mba_inc = get_macroblock_address_increment (picture);
 	    if (!mba_inc)
+		continue;
+	    else if (mba_inc < 0)
 		break;
 
 	    picture->dc_dct_pred[0] = picture->dc_dct_pred[1] =