Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stebbins <jstebbins@jetheaddev.com>2020-04-04 20:21:16 +0300
committerPhilip Langdale <philipl@overt.org>2020-04-10 19:32:13 +0300
commit5f39f63a65ddea4198b6fc48b4da4f72144e28ed (patch)
tree05bcf8dac2841900bcc75c6b1c39d4ea68272598 /libavcodec/movtextdec.c
parent2949f17e992be600c379112d4e84e8455bae180a (diff)
lavc/movtextdec: fix bold, italic, underline flags
They should be 0 or 1 so that 0 or -1 is written to the ass header Signed-off-by: Philip Langdale <philipl@overt.org>
Diffstat (limited to 'libavcodec/movtextdec.c')
-rw-r--r--libavcodec/movtextdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 47a8401119..d6896562c2 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -193,9 +193,9 @@ static int mov_text_tx3g(AVCodecContext *avctx, MovTextContext *m)
tx3g_ptr += 2;
// face-style-flags
s_default.style_flag = *tx3g_ptr++;
- m->d.bold = s_default.style_flag & STYLE_FLAG_BOLD;
- m->d.italic = s_default.style_flag & STYLE_FLAG_ITALIC;
- m->d.underline = s_default.style_flag & STYLE_FLAG_UNDERLINE;
+ m->d.bold = !!(s_default.style_flag & STYLE_FLAG_BOLD);
+ m->d.italic = !!(s_default.style_flag & STYLE_FLAG_ITALIC);
+ m->d.underline = !!(s_default.style_flag & STYLE_FLAG_UNDERLINE);
// fontsize
m->d.fontsize = *tx3g_ptr++;
// Primary color