From patchwork Wed Aug 3 13:58:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 37105 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp458127pzb; Wed, 3 Aug 2022 07:00:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR6YLOPnoKGmeTKwaT8sVA+p6ftqOrDYXEn82XNd1ZtL3FX8ki+67lf4eDQou/KYStYehcV3 X-Received: by 2002:a17:907:1dd2:b0:730:b687:adf1 with SMTP id og18-20020a1709071dd200b00730b687adf1mr2065619ejc.183.1659535220633; Wed, 03 Aug 2022 07:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659535220; cv=none; d=google.com; s=arc-20160816; b=EfwpQ8Rcd1dhjvGTZFz2BjpIMWDJgOh/CAkv+o2yEx4sxFVxLXkSQE+iYyHuRalWyB BOfGf5D1cWexZLXwITgu5npA6mgprYEUPfzUxnbJ13fI/wxnV8vUrhRQhCWThTH+bAO+ AoV1gzGG1WlQfFoNndpJLJf7wxUitmZw0NiJy8YQk/tNYUDu2tV5INpJoZk+YDyP5sOT nhSh2mdf+12d1hTUR+eu275TbtwfeuELucFWHCXlBLYAjQXgmfPzYaEFegvO+40xYLIG Q51L/901SMq3g0gS1bIztDQy6GNW2JzyUru+NmbRhE8gUQwMdOW7yKVQPsXask4TBKGs uEEA== 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=1EJRG7FLN4PtylWQ17ICAck7UrRBAIYSjoGa+Fn0XS4=; b=VHXH1fKYbSsfUkMsUOrE+Vk1kuQfPHL6U5gI9WAK4J0EQVIeK9mg+IZC5I3M5wT88m RWC3TpMkV/M8VNKZzwKLITiEsXN7mDMtS5KFFO4V6fvz4I6Lmnd2g/g3KS0JFYRxn9kW aOvCdEzCmMh6o9bqiPgXwSxCJgKTnoNunjwqrLxR/w4He2Z2zNoi81HlwfqpaYMDcR6K arzCOauI94HPGwjb+7qIny3ilKt4QUw0FZB50XPLxsDqNcPtZ/S4WE957UThQxabQCml QB55s3vvIRAisoBJPIinXlCSgtbnZ/CFrelv5cmLwrNvGPUaCGaM8pkidaFvqF9+VEyc NXig== 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 n10-20020a05640205ca00b0043cc3506c6esi14481189edx.217.2022.08.03.07.00.20; Wed, 03 Aug 2022 07:00: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; 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 7F05168B871; Wed, 3 Aug 2022 16:59:10 +0300 (EEST) 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 5164568B884 for ; Wed, 3 Aug 2022 16:59:01 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id C5745240506 for ; Wed, 3 Aug 2022 15:58:57 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id llAwF3xPKW7O for ; Wed, 3 Aug 2022 15:58:57 +0200 (CEST) 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 C9062240507 for ; Wed, 3 Aug 2022 15:58:54 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 0D05A3A0470; Wed, 3 Aug 2022 15:58:52 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Aug 2022 15:58:28 +0200 Message-Id: <20220803135844.16662-9-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220803135844.16662-1-anton@khirnov.net> References: <20220803135844.16662-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/25] fftools/ffmpeg: remove OutputStream.sync_ist 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: hNkCgPZimz4n It is not actually used for anything. --- fftools/ffmpeg.c | 4 ---- fftools/ffmpeg.h | 1 - fftools/ffmpeg_opt.c | 18 ++++++------------ 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 6124197580..47f9a6137f 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3409,10 +3409,6 @@ static int transcode_init(void) input_streams[ost->source_index]->st->index, ost->file_index, ost->index); - if (ost->sync_ist != input_streams[ost->source_index]) - av_log(NULL, AV_LOG_INFO, " [sync #%d:%d]", - ost->sync_ist->file_index, - ost->sync_ist->st->index); if (ost->enc_ctx) { const AVCodec *in_codec = input_streams[ost->source_index]->dec; const AVCodec *out_codec = ost->enc; diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 69e4758a2d..b7d62957f8 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -468,7 +468,6 @@ typedef struct OutputStream { int64_t vsync_frame_number; /* input pts and corresponding output pts for A/V sync */ - struct InputStream *sync_ist; /* input stream to sync against */ int64_t sync_opts; /* output frame counter, could be changed to some true timestamp */ // FIXME look at frame_number /* pts of the first frame encoded for this stream, used for limiting * recording time */ diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index ffa320da87..0cd807c9c8 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1757,7 +1757,6 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e ost->source_index = source_index; if (source_index >= 0) { - ost->sync_ist = input_streams[source_index]; input_streams[source_index]->discard = 0; input_streams[source_index]->st->discard = input_streams[source_index]->user_set_discard; } @@ -2650,7 +2649,6 @@ static void map_manual(OutputFile *of, AVFormatContext *oc, OptionsContext *o, const StreamMap *map) { InputStream *ist; - OutputStream *ost; if (map->disabled) return; @@ -2695,16 +2693,15 @@ loop_end: if(o-> data_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_DATA) return; - ost = NULL; switch (ist->st->codecpar->codec_type) { - case AVMEDIA_TYPE_VIDEO: ost = new_video_stream (o, oc, src_idx); break; - case AVMEDIA_TYPE_AUDIO: ost = new_audio_stream (o, oc, src_idx); break; - case AVMEDIA_TYPE_SUBTITLE: ost = new_subtitle_stream (o, oc, src_idx); break; - case AVMEDIA_TYPE_DATA: ost = new_data_stream (o, oc, src_idx); break; - case AVMEDIA_TYPE_ATTACHMENT: ost = new_attachment_stream(o, oc, src_idx); break; + case AVMEDIA_TYPE_VIDEO: new_video_stream (o, oc, src_idx); break; + case AVMEDIA_TYPE_AUDIO: new_audio_stream (o, oc, src_idx); break; + case AVMEDIA_TYPE_SUBTITLE: new_subtitle_stream (o, oc, src_idx); break; + case AVMEDIA_TYPE_DATA: new_data_stream (o, oc, src_idx); break; + case AVMEDIA_TYPE_ATTACHMENT: new_attachment_stream(o, oc, src_idx); break; case AVMEDIA_TYPE_UNKNOWN: if (copy_unknown_streams) { - ost = new_unknown_stream (o, oc, src_idx); + new_unknown_stream (o, oc, src_idx); break; } default: @@ -2719,9 +2716,6 @@ loop_end: exit_program(1); } } - if (ost) - ost->sync_ist = input_streams[ input_files[map->sync_file_index]->ist_index - + map->sync_stream_index]; } }