From patchwork Sat Feb 4 10:41:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 40249 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp1868645pzk; Sat, 4 Feb 2023 02:44:36 -0800 (PST) X-Google-Smtp-Source: AK7set+yZ00ajEQeEhl5BeCAMEwixz3ocbUzACo7uGfsjKuA4s7dMrzL6m3sUEICPOdmUPaa0HNt X-Received: by 2002:a05:6402:507:b0:4a2:3606:83ed with SMTP id m7-20020a056402050700b004a2360683edmr13535507edv.22.1675507476026; Sat, 04 Feb 2023 02:44:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675507476; cv=none; d=google.com; s=arc-20160816; b=pyg9FX1ZRGjEscXE6um0gy0pcf0hzmzsged4ImoqW0ni8mrO3VZR14i0S6VG0Li44J 2PQUlSF894h6OeZTf8hoXqSi7PStgVNSGL+OMj42f7m3i58TRn9DC8VNJG2B/LTcjhaw F9digQQ0t9SoeuSQZpaY+CbTWxOX3G94VzzMEe8v9pp+Yx5NDmBNM8eN4XnWyFRoid8J mn5s0ZpqGpKpCpe+JmVt/5ZuoGGFwwL218fdMwd9SYpo+MiPqc8+Ly0U5YQhnC+sjHTu TqCW14Qk0HsqlAXv9Qo0aq3K/nu7Z/u9Uuoo238cujkadtl/wyiqHFHmhSareRlAl9l7 ACnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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:references:in-reply-to:message-id :date:to:from:delivered-to; bh=eGdyIQ/4VLY8c9Sg/DN5TXX9uV06AG5rcR+Zvs8SyQs=; b=nIWKprUHWjFlrt8NQ8Gl63hrhfBle6oErIk0RWYvJlXOdd29c4++SqL6UJpgALvi8x nkJpcTn0OcUk59Z88nIN7ywZRav95keX7+HUeMz5CTvgHnuQIb3UCVLe8bEYbPUlJT2x lG6KvMfHLU0mP54ybtjHj7dFhrANhkEDIdUVfMxoMt51zi1+AcpP1calzmkpWOazPJ01 VPG59yWmv8Q/DBsJKBXOU7uBRIpe2aWm5mCwk0X1hJ76JZtJb3lmHwlJTHQIBW7gI8bt 8Xd/qT6/kddmKhFLJ3XGRYbLdgF28pSh2NgIehzoW8wMNgS+WhW9T8JEGNSNk8e0KBuH 6BBg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q19-20020a056402519300b004a25dc68341si7036203edd.214.2023.02.04.02.44.35; Sat, 04 Feb 2023 02:44:36 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B5B8B68BE9C; Sat, 4 Feb 2023 12:44:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9A03C68BD0F for ; Sat, 4 Feb 2023 12:44:08 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 6611C2404F5 for ; Sat, 4 Feb 2023 11:44:08 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id mJDKsTg9iY-C for ; Sat, 4 Feb 2023 11:44:07 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id AD7A8240591 for ; Sat, 4 Feb 2023 11:44:06 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 098843A0344 for ; Sat, 4 Feb 2023 11:44:05 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sat, 4 Feb 2023 11:41:32 +0100 Message-Id: <20230204104204.20721-2-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230204104204.20721-1-anton@khirnov.net> References: <20230204104204.20721-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 01/33] avformat/avformat: Remove AVOutputFormat.data_codec 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: smoUTz/9yPE/ From: Andreas Rheinhardt No AVOutputFormat has this set. Signed-off-by: Andreas Rheinhardt Signed-off-by: Anton Khirnov --- libavformat/avformat.h | 1 - libavformat/format.c | 2 -- libavformat/mux_utils.c | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 1d97d56ac58..53bbc0063f0 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -614,7 +614,6 @@ typedef struct AVOutputFormat { * @see avdevice_list_devices() for more details. */ int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list); - enum AVCodecID data_codec; /**< default data codec */ /** * Initialize format. May allocate data here, and set any AVFormatContext or * AVStream parameters that need to be set before packets are sent. diff --git a/libavformat/format.c b/libavformat/format.c index 4b1f3c2986e..76f25ab5a67 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -111,8 +111,6 @@ enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name, return fmt->audio_codec; else if (type == AVMEDIA_TYPE_SUBTITLE) return fmt->subtitle_codec; - else if (type == AVMEDIA_TYPE_DATA) - return fmt->data_codec; else return AV_CODEC_ID_NONE; } diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c index 764c834fa2c..55e58ae9d68 100644 --- a/libavformat/mux_utils.c +++ b/libavformat/mux_utils.c @@ -51,8 +51,7 @@ int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, return !!av_codec_get_tag2(ofmt->codec_tag, codec_id, &codec_tag); else if (codec_id == ofmt->video_codec || codec_id == ofmt->audio_codec || - codec_id == ofmt->subtitle_codec || - codec_id == ofmt->data_codec) + codec_id == ofmt->subtitle_codec) return 1; } return AVERROR_PATCHWELCOME;