This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit b08c9c5f533e7dced089d12d4526301cc200c16e Author: Jun Zhao <[email protected]> AuthorDate: Fri May 29 00:28:16 2026 +0800 Commit: Jun Zhao <[email protected]> CommitDate: Tue Jun 23 03:57:25 2026 +0000 lavfi/vf_subtitles: expose shaping option The ass filter exposes libass' shaping mode selection so callers can request complex shaping for scripts such as Arabic. The subtitles filter uses the same renderer path but did not expose the option. This left the zero-initialized shaping field to select ASS_SHAPING_SIMPLE implicitly. Expose the same shaping option for subtitles and default it to auto, matching the ass filter. This allows subtitles=...:shaping=complex to render Arabic lam-alef correctly when libass is built with HarfBuzz support. Signed-off-by: Jun Zhao <[email protected]> --- libavfilter/vf_subtitles.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index dde45357ce..72c621a807 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -76,6 +76,12 @@ typedef struct AssContext { {"fontsdir", "set the directory containing the fonts to read", OFFSET(fontsdir), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS }, \ {"alpha", "enable processing of alpha channel", OFFSET(alpha), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, FLAGS }, \ +#define SHAPING_OPTIONS \ + {"shaping", "set shaping engine", OFFSET(shaping), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, FLAGS, .unit = "shaping_mode"}, \ + {"auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = -1}, INT_MIN, INT_MAX, FLAGS, .unit = "shaping_mode"}, \ + {"simple", "simple shaping", 0, AV_OPT_TYPE_CONST, {.i64 = ASS_SHAPING_SIMPLE}, INT_MIN, INT_MAX, FLAGS, .unit = "shaping_mode"}, \ + {"complex", "complex shaping", 0, AV_OPT_TYPE_CONST, {.i64 = ASS_SHAPING_COMPLEX}, INT_MIN, INT_MAX, FLAGS, .unit = "shaping_mode"}, \ + /* libass supports a log level ranging from 0 to 7 */ static const int ass_libavfilter_log_level_map[] = { [0] = AV_LOG_FATAL, /* MSGL_FATAL */ @@ -262,10 +268,7 @@ static const AVFilterPad ass_inputs[] = { static const AVOption ass_options[] = { COMMON_OPTIONS - {"shaping", "set shaping engine", OFFSET(shaping), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, FLAGS, .unit = "shaping_mode"}, - {"auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = -1}, INT_MIN, INT_MAX, FLAGS, .unit = "shaping_mode"}, - {"simple", "simple shaping", 0, AV_OPT_TYPE_CONST, {.i64 = ASS_SHAPING_SIMPLE}, INT_MIN, INT_MAX, FLAGS, .unit = "shaping_mode"}, - {"complex", "complex shaping", 0, AV_OPT_TYPE_CONST, {.i64 = ASS_SHAPING_COMPLEX}, INT_MIN, INT_MAX, FLAGS, .unit = "shaping_mode"}, + SHAPING_OPTIONS {NULL}, }; @@ -316,6 +319,7 @@ static const AVOption subtitles_options[] = { #if FF_ASS_FEATURE_WRAP_UNICODE {"wrap_unicode", "break lines according to the Unicode Line Breaking Algorithm", OFFSET(wrap_unicode), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, FLAGS }, #endif + SHAPING_OPTIONS {NULL}, }; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
