diff mbox series

[FFmpeg-devel,5/6] avcodec/filter_units_bsf: reindent after previous commit

Message ID tencent_1A1665CD5F203C4D81CF80D550A706389107@qq.com
State Accepted
Commit 4a00cd4fe32a4b9314b3b45354caf37387f5f42a
Headers show
Series [FFmpeg-devel,1/6] avcodec/cbs: add API to discard units by AVDiscard | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Zhao Zhili May 17, 2023, 9:23 p.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

---
 libavcodec/filter_units_bsf.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/filter_units_bsf.c b/libavcodec/filter_units_bsf.c
index e4c2cadbd5..9336753148 100644
--- a/libavcodec/filter_units_bsf.c
+++ b/libavcodec/filter_units_bsf.c
@@ -122,15 +122,15 @@  static int filter_units_filter(AVBSFContext *bsf, AVPacket *pkt)
 
     ff_cbs_discard_units(ctx->cbc, frag, ctx->discard, ctx->discard_flags);
     if (ctx->mode != NOOP) {
-    for (i = frag->nb_units - 1; i >= 0; i--) {
-        for (j = 0; j < ctx->nb_types; j++) {
-            if (frag->units[i].type == ctx->type_list[j])
-                break;
+        for (i = frag->nb_units - 1; i >= 0; i--) {
+            for (j = 0; j < ctx->nb_types; j++) {
+                if (frag->units[i].type == ctx->type_list[j])
+                    break;
+            }
+            if (ctx->mode == REMOVE ? j <  ctx->nb_types
+                                    : j >= ctx->nb_types)
+                ff_cbs_delete_unit(frag, i);
         }
-        if (ctx->mode == REMOVE ? j <  ctx->nb_types
-                                : j >= ctx->nb_types)
-            ff_cbs_delete_unit(frag, i);
-    }
     }
 
     if (frag->nb_units == 0) {
@@ -189,9 +189,9 @@  static int filter_units_init(AVBSFContext *bsf)
         return err;
 
     if (ctx->discard == AVDISCARD_NONE) {
-    // Don't actually decompose anything, we only want the unit data.
-    ctx->cbc->decompose_unit_types    = ctx->type_list;
-    ctx->cbc->nb_decompose_unit_types = 0;
+        // Don't actually decompose anything, we only want the unit data.
+        ctx->cbc->decompose_unit_types    = ctx->type_list;
+        ctx->cbc->nb_decompose_unit_types = 0;
     }
 
     if (bsf->par_in->extradata) {