Merge "SoftAVCDec: fail gracefully in onQueueFilled"
diff --git a/media/libstagefright/codecs/amrwbenc/src/util.c b/media/libstagefright/codecs/amrwbenc/src/util.c
index 76ab1b1..0369d78 100644
--- a/media/libstagefright/codecs/amrwbenc/src/util.c
+++ b/media/libstagefright/codecs/amrwbenc/src/util.c
@@ -60,13 +60,11 @@
 		*y++ = temp1;
 	}
 	num = (Word32)(L>>1);
-	temp1 = *x++;
-	temp2 = *x++;
 	do{
-		*y++ = temp1;
-		*y++ = temp2;
 		temp1 = *x++;
 		temp2 = *x++;
+		*y++ = temp1;
+		*y++ = temp2;
 	}while(--num!=0);
 }