[FFmpeg-cvslog] lavc/libaribcaption: switch all `bool` context variables to `int`

TADANO Tokumei git at videolan.org
Sun Oct 29 18:40:53 EET 2023


ffmpeg | branch: master | TADANO Tokumei <aimingoff at pc.nifty.jp> | Tue Oct 17 22:13:33 2023 +0900| [82faba8a6ce8b6a9a3db635ce0a70495a2b2cf3c] | committer: Jan Ekström

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 <aimingoff at pc.nifty.jp>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=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;



More information about the ffmpeg-cvslog mailing list