From patchwork Tue Oct 25 09:13:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 38984 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp2685090pzb; Tue, 25 Oct 2022 02:15:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ua84MKVtQSc7RrT8JumB3B0GfQVg+MmKMXyevqFmYh1zttbu9/oieB2Zqi1C047F5CYGN X-Received: by 2002:a05:6402:114a:b0:454:85e4:2295 with SMTP id g10-20020a056402114a00b0045485e42295mr35691164edw.348.1666689316836; Tue, 25 Oct 2022 02:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666689316; cv=none; d=google.com; s=arc-20160816; b=SDFUMZQjomSI872gxbWm/oLxL9xFOw59+iOSgk4KDybzAG2Rx0yZQNVOBlEDXGQ19d qEErb42H/RPoEC70PwYwu2CTf//K0CfIq7jEnmoSWVCYsG77R2F1gCphIaNuk8W8YBw6 hahKJoo8c0AWmSpVwtpV1577xN/p9HbQZBE35s7O/cncABiR7R0UOSSZJNHJqVhYZcoQ WydDrUqvxvORQfsr38wrj5HdomzUBnBGntpmCebj5Qg4Qttxcg7JolKeqAVA2raJNYzg DFpB9KWNq0thZhgp8Pa6iITSaftKtNPwtSTajEHM7FWXXYV/J1ONz3pYDPWEFnguYaJQ cBJQ== 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=9dcD3VyQ4HcTRMQGjLR/62td+tPobtWv5cfWDpZ9kso=; b=AQnXcuiws4wdJqOjg2jGLGkPwio7n2OqjU2p70WITp01VISiIjcltYB+sh5c8tn4E4 s3eW/ZKTZk1ueX2S1Ovb9x5P2uqErbQwJzqUvOZQ/5leT110a4gbPaQVu6LByyenRc7M wmzP09tAKzEgapIVtJjSsaMN7ZF5W+0AVpEfKDJ/TnCaGr0tewsVo18hCHHD5yNarLr4 ufvzm8exCAZllOHrT2LpwWtfx8UOo7q9YT8dokTcowiMyjmjETIr/WpevZ0aZ/gQRakM 8qt4AlNG4V5rYviKbbhNlN/DjHcL5Z2ALOhdAcf2haxdKX7kkkof61lnbWeZQvl2UjRz y5DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=I+bymQSj; 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 r18-20020a1709060d5200b0078232bfe3a0si1870157ejh.331.2022.10.25.02.15.16; Tue, 25 Oct 2022 02:15:16 -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=I+bymQSj; 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 0F9E768BC89; Tue, 25 Oct 2022 12:14:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C60768BC71 for ; Tue, 25 Oct 2022 12:13:58 +0300 (EEST) Received: by mail-pj1-f42.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so11313026pjl.3 for ; Tue, 25 Oct 2022 02:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=mN9hz1wJlmZKp4M4qFPr7BCuPqMfQlsCsWbToZjK9v8=; b=I+bymQSjFXhOgKLA25B4rBpZ22nQL+aUgsL5zGHo9g0vTimHu0GhONVwPG/FMowJAJ 23BfjSOMmO0jCHPEMQYrB2oJyl+Z46qwmvkx5e8lXIauoZZLT/plaQcLKjAG4akLeMHK jkBjzNR3KbUBtqTSRFoDOIkLMDio0fcwFJGvJCKU+RfcnAkySBpFbKi6oD8tWo5x9LX7 PaDHFHlcYUm00mmmHkaBinCTVYfB0rqzU89Quz87kFUwWQgQPbtzOMNZdoqLsOc0tPdF FawogDxwwDauWbwj8cebrBJrfQDSMbjmPg1XS8fAJIxEcgnYXdloy33vG+KroiF4RyfV 5DJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=mN9hz1wJlmZKp4M4qFPr7BCuPqMfQlsCsWbToZjK9v8=; b=Nsmb+GTy6TagG2XJRGQurfJG+Z38sWFEcmFn7mjaqvrTZbd3ZF72rbV+7hJyxfwnD8 j22SnEEzg5kqwCxLZslhXwMcBKJDT5FYb8WOUu1iOfNE9/Zx1+5o37quFFDfLjRZSCf8 gtpXbX8mZDI3r/rPkemYT3ZCjShBNgJ/eLmU8u2RZRaXZH5bgcE/V4T5IBQVZ3yzss7h qFolyskb8HY4NS4PANN1RXVJYVLFxsbHY49WuhYSha7kJ6UtGe8QjColGvOKeQaLyAxw 5eDW+CWkp/UwUVmFu7GaBevsuP0m9w0jz0PRPRBpl51BysiScwW6CZ/ASQwdAg4HirzY czkQ== X-Gm-Message-State: ACrzQf36fbwn5AR2Qj4rs1ZA15uzxmcTwgQ+OPCVtzTOo7ErCR/Se9ee Jp9alBWEANW65qhYrnOv95POLOMjLnM= X-Received: by 2002:a17:90a:1508:b0:212:e56b:2b18 with SMTP id l8-20020a17090a150800b00212e56b2b18mr18187963pja.35.1666689237838; Tue, 25 Oct 2022 02:13:57 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id t2-20020a170902e84200b00176dc67df44sm885133plg.132.2022.10.25.02.13.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2022 02:13:57 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: <4acdb3ace6d380e16a47606bd8f828ac60981309.1666689226.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Tue, 25 Oct 2022 09:13:28 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v9 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: softworkz Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tBqkt0BLKqDC 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 2571118ee9..a274d7e92e 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 bcc607d1d7..c864ba3fb6 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 a5da0d7b08..bf97b916c9 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -405,7 +405,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 0874aaa02d..624e21c000 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 5f76f12615..65ba3ad261 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -534,7 +534,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 f86b7c58e7..1b167e1d0a 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;