From patchwork Sun Jun 26 16:35:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 36466 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b27:b0:88:1bbf:7fd2 with SMTP id l39csp1540223pzh; Sun, 26 Jun 2022 09:37:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tp8WMy7roZ9MmEuJV9QhW8zjAxSrILPvYtFTgFPrGkvUSVxZKiID6TEcK3g0lIY92lwDGZ X-Received: by 2002:a17:906:d7:b0:718:df95:985 with SMTP id 23-20020a17090600d700b00718df950985mr8830681eji.582.1656261452410; Sun, 26 Jun 2022 09:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656261452; cv=none; d=google.com; s=arc-20160816; b=R8xE8wam7lKfNhOHtAO9wb3BmDmVL+dsU8qcVJE+b04RvpCufaWeT/q0GCQoMNWzK9 ePNoylgsf3lOYMDYhwajsNCPyyhX5Fl/1lQD98+pg2rEg/MHP6dTFwC/olzBqSAx+Ikw Em+mUc7x72S0gyBI26BLt9vlHUAWGC9jtv1ADHO25Jhq2rdeMokjkGqyjAgPV3WtW5Dp pzA/yVjWWprwkc02R2wHVl2BY28yrhLnwebNg82LKTMj4FsPyMLWP5DZnSLx1ZqfcpKL Q7coptJmIKNX+fHjIDXSIZvWbEE28qPwHEr+mwV1LnutC3yTFIgEJ4TUji+c2SINrBWZ RL6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:to:mime-version:fcc:date:references :in-reply-to:message-id:from:dkim-signature:delivered-to; bh=AdfbzB3AU13UignUU2Lkttd2WL1qzq5cv4x+aQwF+A0=; b=HxQPWm05fpsBQt6ZbihZ9snKjtdiQAtT1vhPR1EfSgcNWtIVx7HyDIm7GO7OSKX/+6 jgyqNt3qlAYXN01UWSeFun7hQ+PXgtM8WQ8+fGxvh1VY23CDx4ZKWoaw0HqehFDEojTU lEybwgo1gG+bTzxXof9s7oRVwnJ/8/SrxRWyaZFIxlxg9GZR4siv4TuH0MzYMOJHWDet IOqRVEZRqF7Iv1ydWECpuP+fp+JPd0u9+02RgUThopeUFms0jJESWijlTXgFVInStL8V 7FJA3xbMJIlbE7pivWK6HNO585cPbcpK5yP7gVKDSuaymRTAeSdBNhfa/RB8gglu4UTq dADw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=ZBLeMUz+; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y7-20020a056402270700b00435681044a9si9653181edd.372.2022.06.26.09.37.32; Sun, 26 Jun 2022 09:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=ZBLeMUz+; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C90B068B889; Sun, 26 Jun 2022 19:35:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CDD4B68B808 for ; Sun, 26 Jun 2022 19:35:32 +0300 (EEST) Received: by mail-pf1-f181.google.com with SMTP id i64so6911795pfc.8 for ; Sun, 26 Jun 2022 09:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:in-reply-to:references:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=+apdqQWCXjvbsiBGHTxHJr6NcaFsm4pI7Cn96n7SgWw=; b=ZBLeMUz+z4HtAOxPT2ljfFX2rQKYokcBwOpBitO3b2PdWCjnwU+143VR4NsBAgqrAb g26OCCZ7697tj/3RM4XSzW2lgX7AMeEu1onO5f5PUCTQEcnAwzfH462ReWxkJ5g/UfSW rchdqAibO/fa2eF+VzPxkgl762pGyoy0LOS23yblc+0pJq62ICcr3JRuMit48dYR7Hl3 3n2of3yeFYgLW2aSyjr/KAe/Oxbhs3spX/Z7i7deKSwN4u19UePgHmbcGYGmHOffA+s1 dSi5wVniQlXknXG1rCoF5ehix+WpfutBRMrlUYVtLhqQO3xpBM4KrxKcZ1KXYgJeVeM0 j6uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:in-reply-to:references:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=+apdqQWCXjvbsiBGHTxHJr6NcaFsm4pI7Cn96n7SgWw=; b=JL4Dg83M5H5LkyvViv/w1N1JgUvPhxR//2A8z1XqXyAFg4wDvP7gOLwt8rn/zRGh5K shlhqMDVeLX2MYpptbjgXBHK7I9S//u177hfguyzt8OtiSzTk+qCPg13fnqanFLi0/aK bGU9aWR1rd+IiwJTSpzJkNj+g5jvUuFMhJVzBnnXYUqKmqxcnx7j7ts+GFG+35A/o/wV PLTjHk9UhEYGOsf9idP3M5rVPpwJsEtiS/4xc/dgzJ6WT8HySKCCdwdWFxOunHbgpO2D bRj9Bv/Dby9W67mv0F+TqX0IPm26/XxmuUGBn/TuHGa5YqZP3S0SlCIKZuHWbFXrmiOg k3+w== X-Gm-Message-State: AJIora+KfKdPdAF/wCvrpylrdI/zkl9P2hMtjwjS2cZ1hdef/I5iNuwv NHHymyuECoUTMAarhotTNm3wxAmeym7e6w== X-Received: by 2002:a65:6c10:0:b0:380:437a:c154 with SMTP id y16-20020a656c10000000b00380437ac154mr8463931pgu.549.1656261331209; Sun, 26 Jun 2022 09:35:31 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id u2-20020a1709026e0200b001615f64aaabsm5390216plk.244.2022.06.26.09.35.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Jun 2022 09:35:30 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: <98f12ad7e90811c5eec7fd535afd916cca7af3b3.1656261322.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Sun, 26 Jun 2022 16:35:04 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v6 07/25] avcodec/subtitles: Replace deprecated enum values X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: Michael Niedermayer , softworkz , Andriy Gelman , Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Yoln0GRpfCBq From: softworkz Signed-off-by: softworkz --- libavcodec/ass.h | 2 +- libavcodec/assdec.c | 2 +- libavcodec/dvbsubdec.c | 2 +- libavcodec/dvdsubdec.c | 2 +- libavcodec/dvdsubenc.c | 2 +- libavcodec/pgssubdec.c | 2 +- libavcodec/xsubdec.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/ass.h b/libavcodec/ass.h index 8bc13d7ab8..43c5ad651a 100644 --- a/libavcodec/ass.h +++ b/libavcodec/ass.h @@ -83,7 +83,7 @@ static inline int avpriv_ass_add_rect(AVSubtitle *sub, const char *dialog, rects[sub->num_rects] = av_mallocz(sizeof(*rects[0])); if (!rects[sub->num_rects]) return AVERROR(ENOMEM); - rects[sub->num_rects]->type = SUBTITLE_ASS; + rects[sub->num_rects]->type = AV_SUBTITLE_FMT_ASS; ass_str = avpriv_ass_get_dialog(readorder, layer, style, speaker, dialog); if (!ass_str) return AVERROR(ENOMEM); diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c index 1a1363471d..7bb60c9b26 100644 --- a/libavcodec/assdec.c +++ b/libavcodec/assdec.c @@ -53,7 +53,7 @@ static int ass_decode_frame(AVCodecContext *avctx, AVSubtitle *sub, if (!sub->rects[0]) return AVERROR(ENOMEM); sub->num_rects = 1; - sub->rects[0]->type = SUBTITLE_ASS; + sub->rects[0]->type = AV_SUBTITLE_FMT_ASS; sub->rects[0]->ass = av_strdup(avpkt->data); if (!sub->rects[0]->ass) return AVERROR(ENOMEM); diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index 4d4007ffd9..8d44529b4a 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -796,7 +796,7 @@ static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_ou rect->w = region->width; rect->h = region->height; rect->nb_colors = (1 << region->depth); - rect->type = SUBTITLE_BITMAP; + rect->type = AV_SUBTITLE_FMT_BITMAP; rect->linesize[0] = region->width; clut = get_clut(ctx, region->clut); diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 97f366cc74..cb6dbbbbbc 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -404,7 +404,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, sub_header->rects[0]->y = y1; sub_header->rects[0]->w = w; sub_header->rects[0]->h = h; - sub_header->rects[0]->type = SUBTITLE_BITMAP; + sub_header->rects[0]->type = AV_SUBTITLE_FMT_BITMAP; sub_header->rects[0]->linesize[0] = w; sub_header->rects[0]->flags = is_menu ? AV_SUBTITLE_FLAG_FORCED : 0; } diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c index d29db7d49c..24da94faee 100644 --- a/libavcodec/dvdsubenc.c +++ b/libavcodec/dvdsubenc.c @@ -269,7 +269,7 @@ static int encode_dvd_subtitles(AVCodecContext *avctx, if (rects == 0 || !h->rects) return AVERROR(EINVAL); for (i = 0; i < rects; i++) - if (h->rects[i]->type != SUBTITLE_BITMAP) { + if (h->rects[i]->type != AV_SUBTITLE_FMT_BITMAP) { av_log(avctx, AV_LOG_ERROR, "Bitmap subtitle required\n"); return AVERROR(EINVAL); } diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index e50c6766c5..05399863b6 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -535,7 +535,7 @@ static int display_end_segment(AVCodecContext *avctx, AVSubtitle *sub, if (!rect) return AVERROR(ENOMEM); sub->rects[sub->num_rects++] = rect; - rect->type = SUBTITLE_BITMAP; + rect->type = AV_SUBTITLE_FMT_BITMAP; /* Process bitmap */ object = find_object(ctx->presentation.objects[i].id, &ctx->objects); diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c index d62fa164a5..30c3595c97 100644 --- a/libavcodec/xsubdec.c +++ b/libavcodec/xsubdec.c @@ -107,7 +107,7 @@ static int decode_frame(AVCodecContext *avctx, AVSubtitle *sub, sub->num_rects = 1; rect->x = x; rect->y = y; rect->w = w; rect->h = h; - rect->type = SUBTITLE_BITMAP; + rect->type = AV_SUBTITLE_FMT_BITMAP; rect->linesize[0] = w; rect->data[0] = av_malloc(w * h); rect->nb_colors = 4;