aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-04-10 08:47:08 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-04-10 08:47:08 +0000
commit84876d36774b6633c2950291fbfb3db5922273fb (patch)
treeadf4c4934ba378fbefe6305ba1206bd958a8fc95
parent0aae3f43e48bbe4b3933db83f75b30685ee8015c (diff)
downloadffmpeg-84876d36774b6633c2950291fbfb3db5922273fb.tar.gz
b frames + slices bugfix
Originally committed as revision 1745 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h263.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index d6da47ad48..316751269a 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -2499,6 +2499,11 @@ static int mpeg4_decode_video_packet_header(MpegEncContext *s)
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;