From patchwork Thu Jan 20 02:48:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 33677 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp5408937iog; Wed, 19 Jan 2022 18:49:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwk0vmy+cphNR0hyU+gAlsv1BzYVSWKHqFAVYNpLDtHLG6CZ4Kzh5DNx9Qm16CfAORHJXIG X-Received: by 2002:a17:907:e93:: with SMTP id ho19mr14609696ejc.168.1642646997279; Wed, 19 Jan 2022 18:49:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642646997; cv=none; d=google.com; s=arc-20160816; b=xaCTN53OX7YglLh3LB8bmxxGGPt/YHm5Zlemlzj5NjD8hKLKCn131ds4NILA7SqHiy cw6F3vYaCzUfcSqopZD9ztpSAusgKKyH5LFW4gEu6Kiy/OReW8m7OmbcxbU27sjx1Tqy zButXYWw3YVQBXeJ5CjbVs9nl7QiGh/6bMvz0VsGvuMCZtGNssv9wUX88mByJa+jqqVO rESTVIjsqKXM7dC7D2h2oeJLtFCXmUGHhLD82+7UnmCYKwnFmc7JQ6nA54vXvZmcpE/6 N7PwtW+Hg1zejKeErM++dmZk973tt9IStbQfBb81XSm8TN48GABNoTBmZPYt8TRs7L4O 5jCQ== 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:from:references :in-reply-to:message-id:dkim-signature:delivered-to; bh=QrwIH3YK7Wk9uWaJ6E/aH/FGcOQ4PdIBC2NKsbwdJEk=; b=RJDQAv7mYkffFl/xkCqFkB6T+3+tBF9PAK+UTAM3z8wnHYvLwicqRrrZYTW6/EVhQk tCFGUhWu8cgfy7HwBxEfg60q7hz9KeK/pz2QMwY7Eg/mNeqvT1TpVImpMiO7XzsdSLC1 QMT1uB8jii5rw9Kfkbbnn5C9HXgNi1/XRpF6d4/6y/lK72+De9wSuMVij59Qb7wUuXoG 8FeGjicDafGperpRYTO6tCCboTNVoj1HqLFoWgYx8YpQ2cMTk7ZcMB3PGFVZuBmnSD2o I9YlXuMCBaE3HMxEbYhfkbxkAetBjO6eTPXcbFS7WFrkuD5tZVAaKQ7PNUWjdiSWG9v7 EMRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="erHYbP/S"; 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 ne8si1226038ejc.126.2022.01.19.18.49.56; Wed, 19 Jan 2022 18:49:57 -0800 (PST) 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="erHYbP/S"; 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 5298C68B217; Thu, 20 Jan 2022 04:48:56 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5CB4E68B1F3 for ; Thu, 20 Jan 2022 04:48:46 +0200 (EET) Received: by mail-pf1-f173.google.com with SMTP id y28so771340pff.2 for ; Wed, 19 Jan 2022 18:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=tP7U9aqZZpiD4YqVHm3brflrusuR3ekpb3goVhG2dbM=; b=erHYbP/SxSnUOEV9IbiOSHpUM08bcLlIeaKjC0H1EQysYZmWCl3TWZmHBSIqRjmAUf 5rQju4V4HJZ2vafB5FDuT2rPBRIAcfVPF6kkqzwTGa783sLb/Cr5LH6h6yM8V4/3pwWv eh2R990sPhc2VLoW6Uy5ewTWlnIiulSb+Y85v4Zpqn06YxbccjlyV8kI3FqE0wQRmKvG My4X95T4L/y4qxrls09sildsqMKDf8S0Af6JYyaI/W+wRmAI37o0aLJbN6EmTLqhcEb0 VAAjZzCdoRLXapVqrh5GjOFodkW3frPQxGrvrXfJcsaFNXyASuZaqSzRIab2rMnHYvz1 Z29w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=tP7U9aqZZpiD4YqVHm3brflrusuR3ekpb3goVhG2dbM=; b=nBsjbV/mhAPlHVGSTs+52yz04/iN1KT6Wa/gUTWNjFKAdsZnqNSfO7AmdqDIVN75Hq TxT6jg2bUUKUjXsUiqzfqRLDRWqSeQr/NDeSX9y87EW9/NLF8mvgyhdDkwaVovaZzGL6 T9L7ff/MvH5hRaEhXBDy9QqHQMZt/CbBHIfCOUAUAE50d3soOpg1pU5YSUn8J6jv7Ib7 pT0779MrCvNGjWlIWupkw0p7Qz8n4FPooiwc0VoDtHDBib9t9ziZ6HYGcULe/c3NSZPJ 6L+7lJGr1CWVP0gMXU8QIid/bVjfIFMg3A1wiDQoS8rW1Pdm+yofb88QfNvd+NbI8dkc fzfw== X-Gm-Message-State: AOAM5339G+X2VFmBVsds5uCO4byrQ5I8HLbiVDmXiajPQnU95sP9+KXU 00b+djbEJ1FFX7GobSgKaY1AuDH9v14= X-Received: by 2002:a05:6a00:44:b0:4be:ac48:6341 with SMTP id i4-20020a056a00004400b004beac486341mr33745554pfk.44.1642646924788; Wed, 19 Jan 2022 18:48:44 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id a1sm804474pgg.18.2022.01.19.18.48.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jan 2022 18:48:44 -0800 (PST) Message-Id: <3de0be7980d7d4aaa555546ac138149578dfe8f1.1642646916.git.ffmpegagent@gmail.com> In-Reply-To: References: From: ffmpegagent Date: Thu, 20 Jan 2022 02:48:16 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 06/26] 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 , Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: +R8WkAyG5ZVA 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 7802a44e71..fd321e7004 100644 --- a/libavcodec/assdec.c +++ b/libavcodec/assdec.c @@ -54,7 +54,7 @@ static int ass_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, 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 bc741a1de6..0d64c6e71c 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -795,7 +795,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 52259f0730..b39b3d1838 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -406,7 +406,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 ff4fbed39d..943a7466d9 100644 --- a/libavcodec/dvdsubenc.c +++ b/libavcodec/dvdsubenc.c @@ -268,7 +268,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 bdd20c914b..22b6616f9b 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -535,7 +535,7 @@ static int display_end_segment(AVCodecContext *avctx, void *data, 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 85cd7d1c20..a4be18a1d8 100644 --- a/libavcodec/xsubdec.c +++ b/libavcodec/xsubdec.c @@ -107,7 +107,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, 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;