From 48afb43549024eff7ad107515763a6ec9f3a2ee8 Mon Sep 17 00:00:00 2001 From: TADANO Tokumei Date: Tue, 17 Oct 2023 22:13:33 +0900 Subject: [PATCH] lavc/libaribcaption: switch all `bool` context variables to `int` On some environments, a `bool` variable is of smaller size than `int`. As AV_OPT_TYPE_BOOL is internally handled as sizeof(int), if a `bool` option was set on such an environment, the memory of following variables would be filled. Additionally, set values may be destroyed by av_opt_copy(). Signed-off-by: TADANO Tokumei (cherry picked from commit 82faba8a6ce8b6a9a3db635ce0a70495a2b2cf3c) --- libavcodec/libaribcaption.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/libaribcaption.c b/libavcodec/libaribcaption.c index 8a8c8f8cfd..be3328c5c9 100644 --- a/libavcodec/libaribcaption.c +++ b/libavcodec/libaribcaption.c @@ -68,14 +68,14 @@ typedef struct ARIBCaptionContext { int subtitle_type; int encoding_scheme; - bool ass_single_rect; + int ass_single_rect; char *font; - bool replace_fullwidth_ascii; - bool force_stroke_text; - bool ignore_background; - bool ignore_ruby; + int replace_fullwidth_ascii; + int force_stroke_text; + int ignore_background; + int ignore_ruby; float stroke_width; - bool replace_drcs; + int replace_drcs; int64_t pts; AVRational time_base;