changeset 1953:98d46737196b libavcodec

corrupted field pictures segfault fix
author michael
date Thu, 22 Apr 2004 21:41:08 +0000
parents 2ede7cc1fe4e
children e943363932d9
files mpeg12.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Thu Apr 22 20:56:29 2004 +0000
+++ b/mpeg12.c	Thu Apr 22 21:41:08 2004 +0000
@@ -2250,8 +2250,8 @@
     s->resync_mb_x=
     s->resync_mb_y= -1;
 
-    if (mb_y >= s->mb_height){
-        av_log(s->avctx, AV_LOG_ERROR, "slice below image (%d >= %d)\n", s->mb_y, s->mb_height);
+    if (mb_y<<field_pic >= s->mb_height){
+        av_log(s->avctx, AV_LOG_ERROR, "slice below image (%d >= %d)\n", mb_y, s->mb_height);
         return -1;
     }