diff mbox series

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

Message ID 20231017131335.201277-2-aimingoff@pc.nifty.jp
State New
Headers show
Series lavc/libaribcaption.c: add MSZ characters related options | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

TADANO Tokumei Oct. 17, 2023, 1:13 p.m. UTC
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@pc.nifty.jp>
---
 libavcodec/libaribcaption.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Jan Ekström Oct. 29, 2023, 8:46 a.m. UTC | #1
On Tue, Oct 17, 2023 at 4:14 PM TADANO Tokumei <aimingoff@pc.nifty.jp> wrote:
>
> 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@pc.nifty.jp>

Change LGTM. I changed the commit message to more match our guide
lines (no ".c" at the end, rephrased the commit message) in
https://github.com/jeeb/ffmpeg/commits/aribcaption_msz_patches_v3 .

Just tell me if you're OK with this and I'll pull it in.

Jan
diff mbox series

Patch

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;