[SCM] libav/experimental: fixing slices which start at mb_x>0

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:33:00 UTC 2013


The following commit has been merged in the experimental branch:
commit 0a6baf39cb426226ec23147f536ad9511336c64a
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sun Aug 4 18:19:09 2002 +0000

    fixing slices which start at mb_x>0
    
    Originally committed as revision 840 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 548e219..8939bb6 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -672,6 +672,12 @@ static int mpeg_decode_mb(MpegEncContext *s,
             }
         }
     }
+    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)){

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list