From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 14FCC434CA for ; Wed, 12 Oct 2022 22:08:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 47E9C68BCDE; Thu, 13 Oct 2022 01:08:32 +0300 (EEST) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC9E668B6AC for ; Thu, 13 Oct 2022 01:08:25 +0300 (EEST) Received: by mail-ej1-f50.google.com with SMTP id b2so139771eja.6 for ; Wed, 12 Oct 2022 15:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ywlFTWl0lbKxI5tzmXQckhMKJIfMG9QOy3H4aXPYzcg=; b=mUzwMjZ/S9KtEFLHSjt+OcESQcsZlMCgMdZ6u/RxHOgBvYZUsxOLk+UZn/6bsINo+S c9Dxq6amcCupgCwol8whGwXF+MIOGUtvl0sCfvxQGhfIxeB5imtvIXNg75fziMFPgEOf bnOQ15LeusZdytv7WJ42eNB262rJ1y+Htb0hOuS8nLu8ozkdDViuu+H/OJgAK3X5OkQ5 sABgwoJePjkSBJKEulz1wWR1IWtes+2l/Z8d83Ioy51Jkl5SMZ2+zafXf1KGXXxd8/9a HVkjKX5cDB3fITqnUP38TYwAEjerlkvM+IwLEbIOF+nUl5V4YvgBe94563KQkzxdC85/ h6vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ywlFTWl0lbKxI5tzmXQckhMKJIfMG9QOy3H4aXPYzcg=; b=DDq7gnzEdtf7UVwQG+eMdzi9+tYwT3+38WZWBtilonzWHTGyZC8OA8r16TTXotXNDa k3TfH9k5FZXFRvqRG9nXVfXrlbL+TEpOTgisq9K3lDTQToMr669n9uzDSvuwCWp+6Mqg d8tRD5nEkHm5rT6DuWFao936iBmcQ2QlhBRc1k9dqIVQMyD7Cl8ZauO3S4MU/tkTsUWW kgY9koSZmYTojJAp65ZTXNKVpj/GibLdvKiw24uc8u+S6xDL3PcxF9kYeNoXXLfb6DOc HBzoBGRWos2xFFwk1Kjyez/kKIA4LZB/nqOIjSXAyerUMdxkbMHbWH3fccR67Zw6rGHl utQg== X-Gm-Message-State: ACrzQf2ZImaBTwV2cbOaPbXAme9qfTxrJseXl6p/zzkMPaBZ7Xk0tOG/ mnoV0Lb5BnCVreKJG4phArnf0am7FOM4xg== X-Google-Smtp-Source: AMsMyM53HcrmuaFCkaRlVty6tjKPAFYAha2rMIFd57bXsgHCqj2H8EIoLQ4jMULjhnadC9uWWWkgEQ== X-Received: by 2002:a17:907:3f94:b0:78d:9d2f:3002 with SMTP id hr20-20020a1709073f9400b0078d9d2f3002mr17272769ejc.40.1665612504542; Wed, 12 Oct 2022 15:08:24 -0700 (PDT) Received: from [192.168.64.1] (84-112-104-25.cable.dynamic.surfer.at. [84.112.104.25]) by smtp.gmail.com with ESMTPSA id bx10-20020a0564020b4a00b00456cbd8c65bsm12127697edb.6.2022.10.12.15.08.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Oct 2022 15:08:24 -0700 (PDT) From: Marvin Scholz To: Anton Khirnov Date: Thu, 13 Oct 2022 00:08:22 +0200 X-Mailer: MailMate (1.14r5898) Message-ID: In-Reply-To: <166559638370.12287.16758170459214904063@lain.khirnov.net> References: <20220928102101.37967-1-epirat07@gmail.com> <166559638370.12287.16758170459214904063@lain.khirnov.net> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] ffmpeg: Make find_stream_info behave like a normal per-file option 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: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 12 Oct 2022, at 19:39, Anton Khirnov wrote: > Quoting Marvin Scholz (2022-09-28 12:21:00) >> Currently it would essentially change the find_stream_info setting for >> the file it was specified for and all following files, which is unusual >> and somewhat unexpected behaviour for a per-file option and not even >> documented to behave like this. > > Well, it's not documented at all. > >> --- >> fftools/ffmpeg.h | 1 + >> fftools/ffmpeg_opt.c | 7 ++++--- >> 2 files changed, 5 insertions(+), 3 deletions(-) >> >> diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h >> index ede0b2bd96..3389ce5edc 100644 >> --- a/fftools/ffmpeg.h >> +++ b/fftools/ffmpeg.h >> @@ -126,6 +126,7 @@ typedef struct OptionsContext { >> int accurate_seek; >> int thread_queue_size; >> int input_sync_ref; >> + int find_stream_info; >> >> SpecifierOpt *ts_scale; >> int nb_ts_scale; >> diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c >> index 5febe319e4..df1c8df454 100644 >> --- a/fftools/ffmpeg_opt.c >> +++ b/fftools/ffmpeg_opt.c >> @@ -190,7 +190,6 @@ static int input_stream_potentially_available = 0; >> static int ignore_unknown_streams = 0; >> static int copy_unknown_streams = 0; >> static int recast_media = 0; >> -static int find_stream_info = 1; >> >> static void uninit_options(OptionsContext *o) >> { >> @@ -240,6 +239,7 @@ static void init_options(OptionsContext *o) >> o->accurate_seek = 1; >> o->thread_queue_size = -1; >> o->input_sync_ref = -1; >> + o->find_stream_info = 1; >> o->shortest_buf_duration = 10.f; >> } >> >> @@ -1307,7 +1307,7 @@ static int open_input_file(OptionsContext *o, const char *filename) >> for (i = 0; i < ic->nb_streams; i++) >> choose_decoder(o, ic, ic->streams[i], HWACCEL_NONE, AV_HWDEVICE_TYPE_NONE); >> >> - if (find_stream_info) { >> + if (o->find_stream_info) { >> AVDictionary **opts = setup_find_stream_info_opts(ic, o->g->codec_opts); >> int orig_nb_streams = ic->nb_streams; >> >> @@ -4000,7 +4000,8 @@ const OptionDef options[] = { >> { "thread_queue_size", HAS_ARG | OPT_INT | OPT_OFFSET | OPT_EXPERT | OPT_INPUT | OPT_OUTPUT, >> { .off = OFFSET(thread_queue_size) }, >> "set the maximum number of queued packets from the demuxer" }, >> - { "find_stream_info", OPT_BOOL | OPT_PERFILE | OPT_INPUT | OPT_EXPERT, { &find_stream_info }, >> + { "find_stream_info", OPT_BOOL | OPT_PERFILE | OPT_INPUT | OPT_EXPERT | OPT_OFFSET, >> + { .off = OFFSET(find_stream_info) }, > > You can drop OPT_PERFILE, since it's implied by OPT_OFFSET. > > Otherwise patch LGTM, I'll do the change myself and push if you don't > object. > Thanks for the review, feel free to do the change yourself. > -- > Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".