This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 3a7331d311e4fee2562da5bf7c9d10839f5240d6 Author: Niklas Haas <[email protected]> AuthorDate: Wed Apr 22 16:31:24 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Tue Jun 9 01:10:57 2026 +0200 swscale/ops: remove unused function ff_sws_enum_ops() Users can trivially recreate this logic anyways. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/ops.c | 24 ------------------------ libswscale/ops.h | 17 ----------------- 2 files changed, 41 deletions(-) diff --git a/libswscale/ops.c b/libswscale/ops.c index 7a313dfa3b..b28dbec75f 100644 --- a/libswscale/ops.c +++ b/libswscale/ops.c @@ -1084,27 +1084,3 @@ int ff_sws_enum_op_lists(SwsContext *ctx, void *opaque, return 0; } - -struct EnumOpaque { - void *opaque; - int (*cb)(SwsContext *ctx, void *opaque, SwsOp *op); -}; - -static int enum_ops(SwsContext *ctx, void *opaque, SwsOpList *ops) -{ - struct EnumOpaque *priv = opaque; - for (int i = 0; i < ops->num_ops; i++) { - int ret = priv->cb(ctx, priv->opaque, &ops->ops[i]); - if (ret < 0) - return ret; - } - return 0; -} - -int ff_sws_enum_ops(SwsContext *ctx, void *opaque, - enum AVPixelFormat src_fmt, enum AVPixelFormat dst_fmt, - int (*cb)(SwsContext *ctx, void *opaque, SwsOp *op)) -{ - struct EnumOpaque priv = { opaque, cb }; - return ff_sws_enum_op_lists(ctx, &priv, src_fmt, dst_fmt, enum_ops); -} diff --git a/libswscale/ops.h b/libswscale/ops.h index 9ef43addc2..ad0888f7a0 100644 --- a/libswscale/ops.h +++ b/libswscale/ops.h @@ -352,26 +352,9 @@ enum SwsOpCompileFlags { * @return 0 on success, the return value if cb() < 0, or a negative error code * * @note `ops` belongs to ff_sws_enum_op_lists(), but may be mutated by `cb`. - * @see ff_sws_enum_ops() */ int ff_sws_enum_op_lists(SwsContext *ctx, void *opaque, enum AVPixelFormat src_fmt, enum AVPixelFormat dst_fmt, int (*cb)(SwsContext *ctx, void *opaque, SwsOpList *ops)); -/** - * Helper function to enumerate over all possible operations, under the current - * set of options in `ctx`, and run the given callback on each operation. - * - * @param src_fmt If set (not AV_PIX_FMT_NONE), constrain the source format - * @param dst_fmt If set (not AV_PIX_FMT_NONE), constrain the destination format - * @return 0 on success, the return value if cb() < 0, or a negative error code - * - * @note May contain duplicates. `op` belongs to ff_sws_enum_ops(), but may be - * mutated by `cb`. - * @see ff_sws_num_op_lists() - */ -int ff_sws_enum_ops(SwsContext *ctx, void *opaque, - enum AVPixelFormat src_fmt, enum AVPixelFormat dst_fmt, - int (*cb)(SwsContext *ctx, void *opaque, SwsOp *op)); - #endif _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
