From patchwork Sun Sep 8 19:22:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 51397 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1269428vqu; Sun, 8 Sep 2024 12:22:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUFGq/SnqAswK59KWrGg7PpoOJDdYDIk75mUD143tEYpl+sakcekgLwnP/E0oWpvnqhlUfPzCDSM3OnQkMP7p/M@gmail.com X-Google-Smtp-Source: AGHT+IHRCwu/KIcfxM+6QppIKLzk3Dw5P+ZMQEYu1Gb6FVRQ5UlgTwVJRohOFLkbr2wrhql0u6+7 X-Received: by 2002:a17:907:7255:b0:a8a:85c7:8745 with SMTP id a640c23a62f3a-a8a888dbc3bmr262094066b.8.1725823340883; Sun, 08 Sep 2024 12:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725823340; cv=none; d=google.com; s=arc-20240605; b=g18r7K8zRcvBNizLPjAHY5WO3WGBwhPQAsuWsRA0Gkv4lQst6+jdSUMP0QdblAv+tC 5fxoxxyusbvu/yPFQvkNyHXVq61RVPS1NK2J5CK824oHii7dk8vdlfb8bhicTTZRV/+9 4raZenC+hbHZG1uTy0nKDTYfA8Ed5l/1tjCUkzoWa6Z1W0ASp3AUl7ibF+3Yfn5YaPz1 rf947e8fWWJqrDwT8Z3kvmU2OKlwMzWoXgHnnUd5sKH1bnG2KhrZCulg0nttHvCE0wq0 rwiRO/b0MyomZY65T98IlHGQyBF1nO4D1NzlrR0VR69QgZkLITtXkluMu/ssQ/2Fem3Q mSxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=Yxpnevq6/oDiAv61Rhb/yRDg+ae5uKfeRm9D9rsIr8U=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=JnOhjeoSJf51lM+Odceh6FEnhl11VbeaToOdXHXqmWqdqMhrdoJ9XfJortGJCaKt+6 lXzYu1eJzkmOEFsPBotCB+mkFq7KA1k1iDBeLXJxT2xi1i3lyzLldbyLidSFp2mdCKcL +P98D6tkb2Arj4lJFtNMSqJFGmTBVrprIwvM1zRBPXpaewqmR3+tnrHZ6yaS3sT2MKf9 3wie72c7yEHdD2D/wjih1xoB1OWjWmADHKSlY0B+Do3NE74jUL1DeuG4rdCY8HjMMSeS BpeosvyAfUnAJoZP1HOFngfOm07mAuWF/MR/MYCaEz36bzRzGm89WVn9DUNCzKvDTre+ pEyQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=PmUIubQN; 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; dara=fail header.i=@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 a640c23a62f3a-a8d25d92bd9si254498466b.902.2024.09.08.12.22.20; Sun, 08 Sep 2024 12:22:20 -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=20230601 header.b=PmUIubQN; 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; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7289968DC94; Sun, 8 Sep 2024 22:22:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A0F468DC65 for ; Sun, 8 Sep 2024 22:22:11 +0300 (EEST) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-7184a7c8a45so2010369b3a.0 for ; Sun, 08 Sep 2024 12:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725823328; x=1726428128; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Dqszgd8LX6QAc2ghjNqR3ODB/QN8KHKA6cQReF3xfAs=; b=PmUIubQNM3Lc3iNsn1D/hanNOjbjVY6QMnvMGywz6q1dX2sIoj0+KYkAyw1HgaHaeL o3hhp1Omlzvq3XYNbAE5ao5PktiB7OKJ81ybMEZUwXNfzZuGVCze9st8dIqGzuDGwngy cntbBOyKVLUrPuQGuarE5TVMTxlfYa93P6eqlEDC5gCM+nc8R6ugmG2LqJYHZ2BYiZ1S n+x16cmI7tZjoVEnS5N2td3G3gL2Q0nXQejOdNsLcAhPHwoNV3W4CwskHI315K6XtnSK dNZ3klPCl40TXJNdlM5I1Li3X5TXVhd8ZzvNxZVWjBbePg3d/wUsTUZNJ0cXXeaFSV/b DikA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725823328; x=1726428128; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Dqszgd8LX6QAc2ghjNqR3ODB/QN8KHKA6cQReF3xfAs=; b=W+o7UjtKbp0J+e1/Qhi+UNZJisTHaYO0Czar5grQDr23u5qFDklera71WPayZIC2rH aTqTcnDP+EImM68wxK77vYHKplBhMb9QaQDlQ8yFiwB+ra/0qdTQ8iEABZ5xcpp4GPu7 Ee+zLlxzRix9nYQObZPaEbSrvTUGMng0ff6dg2zojxh3b6+Y8oYm5CnR3IdeAzipuSW0 +XquLJq8tt2RIAlG4G6ldO9GOTh418756sHQLHVpLGnwpMYVIXe2eotNJN3Il8oMYvp2 KCUygrDJi9/yKVuBcikAl4g1GsiQDR3N2Y0cZsnzpC5vumWphQt9cYlbcY4ti99vuPeQ mlQQ== X-Gm-Message-State: AOJu0Ywtkqz32OCyTuXxhakBsrpP21r94gr8F8seR5HmSoqKjF6OWhAf L2wi2xBZwRr0oiIyMqn4P397/76HjdPDFizSUmTBQ8QaBut0HGcweHpYmA== X-Received: by 2002:a05:6a00:2ea5:b0:718:d573:25b9 with SMTP id d2e1a72fcca58-718d5e702ecmr13400216b3a.16.1725823327729; Sun, 08 Sep 2024 12:22:07 -0700 (PDT) Received: from localhost.localdomain ([181.92.233.116]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d8242b3910sm2704001a12.54.2024.09.08.12.22.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Sep 2024 12:22:07 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 8 Sep 2024 16:22:01 -0300 Message-ID: <20240908192201.9963-1-jamrial@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/avcodec: remove usage of __typeof__() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ENPGBvCTdTKz It's non-standard C. Signed-off-by: James Almer --- libavcodec/avcodec.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index cb89236549..78153d12f1 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -708,9 +708,9 @@ int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *fr return ff_encode_receive_frame(avctx, frame); } -#define WRAP_CONFIG(allowed_type, field, terminator) \ +#define WRAP_CONFIG(allowed_type, field, field_type, terminator) \ do { \ - static const __typeof__(*(field)) end = terminator; \ + static const field_type end = terminator; \ if (codec->type != (allowed_type)) \ return AVERROR(EINVAL); \ *out_configs = (field); \ @@ -753,15 +753,15 @@ int ff_default_get_supported_config(const AVCodecContext *avctx, switch (config) { FF_DISABLE_DEPRECATION_WARNINGS case AV_CODEC_CONFIG_PIX_FORMAT: - WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->pix_fmts, AV_PIX_FMT_NONE); + WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->pix_fmts, enum AVPixelFormat, AV_PIX_FMT_NONE); case AV_CODEC_CONFIG_FRAME_RATE: - WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->supported_framerates, (AVRational){0}); + WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->supported_framerates, AVRational, (AVRational){0}); case AV_CODEC_CONFIG_SAMPLE_RATE: - WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->supported_samplerates, 0); + WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->supported_samplerates, int, 0); case AV_CODEC_CONFIG_SAMPLE_FORMAT: - WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->sample_fmts, AV_SAMPLE_FMT_NONE); + WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->sample_fmts, enum AVSampleFormat, AV_SAMPLE_FMT_NONE); case AV_CODEC_CONFIG_CHANNEL_LAYOUT: - WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->ch_layouts, (AVChannelLayout){0}); + WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->ch_layouts, AVChannelLayout, (AVChannelLayout){0}); FF_ENABLE_DEPRECATION_WARNINGS case AV_CODEC_CONFIG_COLOR_RANGE: