Commit a7d2861d36756b913e85681b86ed3385274e8ced broke svq3 decoding due to unscrupulous removal of blocks, that inadvertedly affected the code flow.

Attached patch fixes this regression. Feel free to take it, or leave it.

--
] ccr/TNSP ^ pWp  ::  ccr tnsp org  ::  http://ccr.tnsp.org/
] PGP key: 0466 95ED 96DF 3701 C71D D62D 10A6 28A6 1374 C112
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -559,17 +559,17 @@
             if (svq3_mc_dir(s, mb_type - 1, mode, 0, 0) < 0)
                 return -1;
         } else {        /* AV_PICTURE_TYPE_B */
-            if (mb_type != 2)
+            if (mb_type != 2) {
                 if (svq3_mc_dir(s, 0, mode, 0, 0) < 0)
                     return -1;
-            else
+            } else
                 for (i = 0; i < 4; i++)
                     memset(h->cur_pic.f.motion_val[0][b_xy + i * h->b_stride],
                            0, 4 * 2 * sizeof(int16_t));
-            if (mb_type != 1)
+            if (mb_type != 1) {
                 if (svq3_mc_dir(s, 0, mode, 1, mb_type == 3) < 0)
                     return -1;
-            else
+            } else
                 for (i = 0; i < 4; i++)
                     memset(h->cur_pic.f.motion_val[1][b_xy + i * h->b_stride],
                            0, 4 * 2 * sizeof(int16_t));
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to