changeset 595:5f7ab2e73bc9 libavcodec

fixing slices which start at mb_x>0
author michaelni
date Sun, 04 Aug 2002 18:19:09 +0000
parents 7e26eb37bbbc
children 01da62a51ce8
files mpeg12.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Sun Aug 04 16:46:18 2002 +0000
+++ b/mpeg12.c	Sun Aug 04 18:19:09 2002 +0000
@@ -672,6 +672,12 @@
             }
         }
     }
+    if(s->mb_x==-1 /* first MB in a slice */ && s->mb_incr>1){
+        s->mb_x+= (s->mb_incr - 1) % s->mb_width;
+        s->mb_y+= (s->mb_incr - 1) / s->mb_width;
+        s->mb_incr= 1;
+    }
+
     if (++s->mb_x >= s->mb_width) {
         s->mb_x = 0;
         if (s->mb_y >= (s->mb_height - 1)){