summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-06-27 23:13:10 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-06-27 23:13:10 +0000
commit6b53b87e20a4fc399df7e1936769a3969a901cfc (patch)
tree67b71ef43ea54efa44e18397d4b19b768c4e1f8d /libavcodec/h264.c
parent43c0040a6569334d4cebdcc26603bbf3a3d71c26 (diff)
check mb_y
Originally committed as revision 4401 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 9517f3cc71..f17c592df6 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4241,6 +4241,9 @@ static int decode_slice_header(H264Context *h){
s->resync_mb_x = s->mb_x = first_mb_in_slice % s->mb_width;
s->resync_mb_y = s->mb_y = first_mb_in_slice / s->mb_width;
+ if(s->mb_y >= s->mb_height){
+ return -1;
+ }
if(s->picture_structure==PICT_FRAME){
h->curr_pic_num= h->frame_num;