changeset 1852:9ecbf5d23cdc libavcodec

10l (segfault fix)
author michael
date Tue, 02 Mar 2004 17:21:55 +0000
parents 07a4c1c4b929
children 9de89f579086
files mpeg12.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Tue Mar 02 03:18:03 2004 +0000
+++ b/mpeg12.c	Tue Mar 02 17:21:55 2004 +0000
@@ -2205,8 +2205,8 @@
             if(field_pic && !s->first_field)
                 xy += wrap/2;
 
-            for(dir=0; dir<2; dir++){
-                for(i=0; i<2; i++){
+            for(i=0; i<2; i++){
+                for(dir=0; dir<2; dir++){
                     if (s->mb_intra || (dir==1 && s->pict_type != B_TYPE)) {
                         motion_x = motion_y = 0;
                     }else if (s->mv_type == MV_TYPE_16X16){
@@ -2221,8 +2221,8 @@
                     s->current_picture.motion_val[dir][xy    ][1] = motion_y;
                     s->current_picture.motion_val[dir][xy + 1][0] = motion_x;
                     s->current_picture.motion_val[dir][xy + 1][1] = motion_y;
-                    xy += wrap;
                 }
+                xy += wrap;
             }
         }