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 E6F044497F for ; Wed, 28 Sep 2022 10:21:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8D23C68BC70; Wed, 28 Sep 2022 13:21:12 +0300 (EEST) Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 94F4368BC68 for ; Wed, 28 Sep 2022 13:21:05 +0300 (EEST) Received: by mail-ej1-f53.google.com with SMTP id l14so26121381eja.7 for ; Wed, 28 Sep 2022 03:21:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=RHoQ2yuAl5vXa5FgA29cRh23Owv7LCFV347vogmGzTg=; b=n9qjgWIoHi1HQK0Pmt3bwVM75EL3QZ5guUMdn+2UOy2iSOQ4PegJrtKx88H8LmJIGc aqIX+sSnSg6x3ggI2V5ZSWoijE2oulCJI/qWZUC0Rz9CYIovcC0WrZsFViIzcXOHSzIO 95wSf+yUgap3+n8uY7UrpdQaR51w1lnax3CcjZ18thHiBv1GdA/ADY+0EKcCSD5cuBiM OX5Ccp8AT+lyz9nX8TX6cfeUG1ycbCstJQg28kTVySRhPOBU4CNB98+dqEi6VJ3wcZC0 Ob183jhGA4Si00y0yHoI+0S+bTpa/w+8sUGNrFIZuH5Tdh8Sy7MWZnxO+PhDL6kW8flw nGqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=RHoQ2yuAl5vXa5FgA29cRh23Owv7LCFV347vogmGzTg=; b=xXZKt3gnrHY38jz+gNRaKWZtbAnjv/pMfTL0dcAYy/zYB4xea6KUGOAv0LG342LT+y fKUe1eBu+uueaHt/Gz0llMc/objMxc5f+fICkuveYal1Kzb32af22ANj3+n8pfqWJzVt msnqP9s7YgF5y7QrToARGTeUVGPLC9ym5s9gdlQB9liK5STKsJtIjxXT/PTmd1okuncP HN4AFi+z2ZxvgJKbaWcydvBWBqhsCSgTBuiQ7YdH96XzzAfThxGroeeAWQ7scFAjjHPl woKIe/V/nw0zyhnBekfkqqioNVhib9Yjd8YFt7TegE3pLdaSL+Gz/EvyiOllrewA8vbU dSpA== X-Gm-Message-State: ACrzQf3RWsj993i8l6XuqDmu7/8kX6nsjtAuEMk2/FKj+mhNvgLjVoE6 Bi4jorRXSvejUaAmf26bA4FgWRM/CJc97A== X-Google-Smtp-Source: AMsMyM4CIPHOXzuQqh9Cp9q2BhhKvKQ5qlkM95BZrO+Bdl8ViPi1rHlf0bTR1JaAMkGhIgXWk807Rw== X-Received: by 2002:a17:907:2bc3:b0:76f:5a9b:2039 with SMTP id gv3-20020a1709072bc300b0076f5a9b2039mr26061566ejc.534.1664360464693; Wed, 28 Sep 2022 03:21:04 -0700 (PDT) Received: from MBP-von-Marvin.citadel.scalie.me (84-112-104-25.cable.dynamic.surfer.at. [84.112.104.25]) by smtp.gmail.com with ESMTPSA id m17-20020a50c191000000b00456f569f31dsm3164632edf.75.2022.09.28.03.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 03:21:04 -0700 (PDT) From: Marvin Scholz To: ffmpeg-devel@ffmpeg.org Date: Wed, 28 Sep 2022 12:21:00 +0200 Message-Id: <20220928102101.37967-1-epirat07@gmail.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) MIME-Version: 1.0 Subject: [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: Marvin Scholz 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: 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. --- 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) }, "read and decode the streams to fill missing information with heuristics" }, { "bits_per_raw_sample", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(bits_per_raw_sample) }, -- 2.37.0 (Apple Git-136) _______________________________________________ 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".