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>
This commit is contained in:
John Stebbins 2020-04-04 11:21:16 -06:00 committed by Philip Langdale
parent 2949f17e99
commit 5f39f63a65
1 changed files with 3 additions and 3 deletions

View File

@ -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