From patchwork Mon Apr 6 17:51:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stebbins X-Patchwork-Id: 18716 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id F19CE44BD26 for ; Mon, 6 Apr 2020 20:53:45 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DB5C468B3F8; Mon, 6 Apr 2020 20:53:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.jetheaddev.com (mail.jetheaddev.com [70.164.99.34]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C25DF68B035 for ; Mon, 6 Apr 2020 20:53:38 +0300 (EEST) Received: from creator.alpe-d-promontory.fun (192.168.13.165) by cas.jetheaddev.com (192.168.13.27) with Microsoft SMTP Server (TLS) id 14.3.351.0; Mon, 6 Apr 2020 10:53:37 -0700 From: John Stebbins To: Date: Mon, 6 Apr 2020 11:51:58 -0600 Message-ID: <20200406175218.1299994-4-jstebbins@jetheaddev.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200406175218.1299994-1-jstebbins@jetheaddev.com> References: <20200406175218.1299994-1-jstebbins@jetheaddev.com> MIME-Version: 1.0 X-Originating-IP: [192.168.13.165] Subject: [FFmpeg-devel] [PATCH 03/23] lavc/movtextdec: fix bold, italic, underline flags X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" They should be 0 or 1 so that 0 or -1 is written to the ass header --- libavcodec/movtextdec.c | 6 +++--- 1 file 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