changeset 1176:a39d55237445 libavcodec

b frames + slices bugfix
author michaelni
date Thu, 10 Apr 2003 08:47:08 +0000
parents d2fd27d01df8
children fea03d2c4946
files h263.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/h263.c	Thu Apr 10 01:39:53 2003 +0000
+++ b/h263.c	Thu Apr 10 08:47:08 2003 +0000
@@ -2499,6 +2499,11 @@
         fprintf(stderr, "illegal mb_num in video packet (%d %d) \n", mb_num, s->mb_num);
         return -1;
     }
+    if(s->pict_type == B_TYPE){
+        while(s->next_picture.mbskip_table[ mb_num ]) mb_num++;
+        if(mb_num >= s->mb_num) return -1; // slice contains just skiped MBs which where allready decoded
+    }
+    
     s->mb_x= mb_num % s->mb_width;
     s->mb_y= mb_num / s->mb_width;