This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 7e6151c0b38e5203735113c24f23d3020c19efd1
Author:     Niklas Haas <[email protected]>
AuthorDate: Thu Oct 8 12:58:36 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Oct 20 21:33:01 2026 +0000

    swscale/ops: split op referencing to op_ref()
    
    Moving it next to op_uninit().
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/ops.c | 41 ++++++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/libswscale/ops.c b/libswscale/ops.c
index 06516d0e0e..21a7faeac6 100644
--- a/libswscale/ops.c
+++ b/libswscale/ops.c
@@ -688,6 +688,26 @@ void ff_sws_op_list_update_comps(SwsOpList *ops)
         update_input_pads(ops, &ops->ops[n], need_out);
 }
 
+static void op_ref(SwsOp *op)
+{
+    switch (op->op) {
+    case SWS_OP_READ:
+        if (op->rw.filter.kernel)
+            av_refstruct_ref(op->rw.filter.kernel);
+        break;
+    case SWS_OP_DITHER:
+        av_refstruct_ref(op->dither.matrix);
+        break;
+    case SWS_OP_FILTER_H:
+    case SWS_OP_FILTER_V:
+        av_refstruct_ref(op->filter.kernel);
+        break;
+    case SWS_OP_LUT_3D:
+        av_refstruct_ref_c(op->lut3d.lut);
+        break;
+    }
+}
+
 static void op_uninit(SwsOp *op)
 {
     switch (op->op) {
@@ -754,25 +774,8 @@ SwsOpList *ff_sws_op_list_duplicate(const SwsOpList *ops)
     }
 
     for (int i = 0; i < copy->num_ops; i++) {
-        SwsOp *op = &copy->ops[i];
-        op->ops = copy;
-
-        switch (op->op) {
-        case SWS_OP_READ:
-            if (op->rw.filter.kernel)
-                av_refstruct_ref(op->rw.filter.kernel);
-            break;
-        case SWS_OP_DITHER:
-            av_refstruct_ref(op->dither.matrix);
-            break;
-        case SWS_OP_FILTER_H:
-        case SWS_OP_FILTER_V:
-            av_refstruct_ref(op->filter.kernel);
-            break;
-        case SWS_OP_LUT_3D:
-            av_refstruct_ref_c(op->lut3d.lut);
-            break;
-        }
+        op_ref(&copy->ops[i]);
+        copy->ops[i].ops = copy;
     }
 
     return copy;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to