[FFmpeg-devel] [PATCH v3 1/3] lavc/libaribcaption.c: FIX: change all `boot` option var to `int`

TADANO Tokumei aimingoff at pc.nifty.jp
Tue Oct 17 14:21:57 EEST 2023


This patch fixes a bug in curret version.

On some environments, a `bool` variable is small space than `int`.
If a `bool` option was specified by command line, following
variables would be filled and may be destroyed by av_opt_copy().

This patch change all the `bool` option variables in
`ARIBCaptionContext` to `int`.

Signed-off-by: TADANO Tokumei <aimingoff at pc.nifty.jp>
---
 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;
-- 
2.39.2



More information about the ffmpeg-devel mailing list