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 4F7AB471F8 for ; Tue, 29 Aug 2023 22:14:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4572868C6E5; Wed, 30 Aug 2023 01:14:39 +0300 (EEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2016.outbound.protection.outlook.com [40.92.91.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CCE9E68BCFB for ; Wed, 30 Aug 2023 01:14:32 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=idXB9MRHRbei26l9hyLlwSlp3NXjtPjqbGVKwfjhDQ67IlSPrYpSO466JiDqSyDwVzUxG5jwy5C9+AintEewy/Wk687zksdhTHR4JJs4G0nKEiBfku5+EhfWEjbdJshhLG8x8QuhHJnm0pfUDQ2nqoijW09A9qoIonnAvxYcpc8yme6ieGwcKqaSCO6Q7u71nBJjmVaImUHQq/gE+voCJLgRCtDPf4dzd1dEWsLGHFKif1wsmnLz0JMNJ5XRoF0CnGxO13GTzduJ6XZVIsEMl2NOS1AdW3nuTj4RjFQ5i73CB3ao1r9XAUwygJuVFXl6CFPdcZCbI9pXR6uu8lQV/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=N/NsPB2mfZWxjFx1+U6LtzngQQQf/eMKRofyvCUl42o=; b=C4Eu/CltsVKA5GhjfPNvlP4G2hhf3Y5Wv6nFYvN+0pIFPadE0ahlwn1zcnvvTufLHU0xDUP/OjaYR//G/rvRqcq+VWg9D3GmJsk1gBIX+dkG9Etoj1jon1nPdI2QhBfC1laS/bfTHjCrrA5N/24AsLj7KLGkM/mfypEMDuk7GMuMpGCTM9UPNBjOvDmsOPuMxlLNRWyYNPMAPBh0+TPLpyZ7zPAQYlZYeW9BB6QK0FVitA8wt27hfahC8vZ0gmm/LsdEhp9XxInaFb7sa56u3IoSko+6+PJWUSy5zzcIjxmdsiWeyycQx0xCZuHW4IhZi/2N4myBZNVxaOTEpHNVqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N/NsPB2mfZWxjFx1+U6LtzngQQQf/eMKRofyvCUl42o=; b=eTUhYjtZNf+qrCHXPIaGRMWlANvIf/4FYeLjiNGnLfw0+FwN74zVnlIjofrWwv2ZhKIh5uqF56WxV0r7Iqzp67uUrC4NRpOHc7tEb+w9iRXpYlfBTmYVcGGvX53GabIWPqXdWqSJC/czBhVVnX1wVwW6k2Uv1uq5XyooEVSwdckfs5GXQi36lEu1AtcZ6Pf/4MYa8NX/ooZhtf9bX5ST+zwcrHiGnxgO2zyZ+v3kYjjkIUOy6viXGyARYLW9HPQRVC/8eMtPuk6fC8q7GJ+awGv6a3Wkfvqwdrhptx9Lg8XdfUgIYLqfxuTf0+m+u3+IvliSRnhzfuBDqtTH4E2aIA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0396.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.35; Tue, 29 Aug 2023 22:14:31 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6699.034; Tue, 29 Aug 2023 22:14:31 +0000 Message-ID: Date: Wed, 30 Aug 2023 00:15:47 +0200 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230829090751.2329-1-anton@khirnov.net> From: Andreas Rheinhardt In-Reply-To: <20230829090751.2329-1-anton@khirnov.net> X-TMN: [6Nowk9xY/Tped71zb4JqoWWuhFgA095bFWnnnlcpceo=] X-ClientProxiedBy: ZR0P278CA0058.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::9) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0396:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b9c8053-13bd-45c4-4083-08dba8dd5196 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yui09bQy7Vc1iRy40QC2pHp5sf2RGtHZAAMpfODRkX6n02g9+FxZBfmOhBl/sHRF05ied47hzVqhz1fj2pqUMqZ6BfxREGIPHusZ00eiHoiKiNw3NEapepQChZ6k2N9g9u/HuiV4r2XunOpldX7toKjnIw5ZthSfX99OwN/kNz0NLmoBk5pcetrz9EHu1/fIKE8t/tifgvJa65d5itod77U+QgAN76hvsew78VT0KUsGly5IG5VcTHK8r2tmUr4JP+CWfwJe6zbXMlkMOZ6VVExEg9ROWbuGWhkU9Guw2+N19BdsGu1j0D93W6U9G5skzfqsC3wHdNIy4ESLi3hw3LLzL0c85MYe4zztTRX1k3CrZsqKnkKxfuRaViye4zJH0rYeLw2SJoVgWoLpKZu5Qm5d1Um/map0DHcQXN+03H5LxFL9JZlpJpXkFdjdA+MZzbQiUotlo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VLNnNjSEk1?= =?utf-8?B?Yk11bHpCNmptZC9ESmU1eU4xSHJIR0ozeWhlcXhNY0tLRTFVNXRlTyt4eWFY?= =?utf-8?Q?VTbNuWdBiyGhE07VLQye?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b9c8053-13bd-45c4-4083-08dba8dd5196 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2023 22:14:31.5522 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P250MB0396 Subject: Re: [FFmpeg-devel] [PATCH] lavf: deprecate AVFMT_FLAG_SHORTEST 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 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: Anton Khirnov: > It was added in cb114ed4640 with the comment > "This will allow fixing several bugs with the -shortest option". > > Since > * there is no explanation of what these bugs are > * libavformat is not the place to work around ffmpeg CLI bugs > * there is no indication that this feature is actually in use > deprecate it without replacement. > --- > doc/APIchanges | 3 +++ > libavformat/avformat.h | 2 ++ > libavformat/internal.h | 2 ++ > libavformat/mux.c | 2 ++ > libavformat/options.c | 2 ++ > libavformat/options_table.h | 4 +++- > libavformat/version_major.h | 1 + > 7 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/doc/APIchanges b/doc/APIchanges > index ad1efe708d..001de4544b 100644 > --- a/doc/APIchanges > +++ b/doc/APIchanges > @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 > > API changes, most recent first: > > +2023-08-xx - xxxxxxxxxx - lavf 60 - avformat.h > + Deprecate AVFMT_FLAG_SHORTEST without replacement. > + > 2023-08-18 - xxxxxxxxxx - lavu 58.17.100 - channel_layout.h > All AV_CHANNEL_LAYOUT_* macros are now compatible with C++ 17 and older. > > diff --git a/libavformat/avformat.h b/libavformat/avformat.h > index 1916aa2dc5..8a145a8a8b 100644 > --- a/libavformat/avformat.h > +++ b/libavformat/avformat.h > @@ -1241,7 +1241,9 @@ typedef struct AVFormatContext { > #define AVFMT_FLAG_BITEXACT 0x0400 > #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) > #define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats > +#if FF_API_LAVF_SHORTEST > #define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops. > +#endif > #define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer > > /** > diff --git a/libavformat/internal.h b/libavformat/internal.h > index 594afd731d..a016ef197d 100644 > --- a/libavformat/internal.h > +++ b/libavformat/internal.h > @@ -152,10 +152,12 @@ typedef struct FFFormatContext { > > int avoid_negative_ts_use_pts; > > +#if FF_API_LAVF_SHORTEST > /** > * Timestamp of the end of the shortest stream. > */ > int64_t shortest_end; > +#endif > > /** > * Whether or not avformat_init_output has already been called > diff --git a/libavformat/mux.c b/libavformat/mux.c > index 415bd3948f..b7ae90f3c4 100644 > --- a/libavformat/mux.c > +++ b/libavformat/mux.c > @@ -990,6 +990,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt, > } > } > > +#if FF_API_LAVF_SHORTEST > if (si->packet_buffer.head && > eof && > (s->flags & AVFMT_FLAG_SHORTEST) && > @@ -1025,6 +1026,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt, > flush = 0; > } > } > +#endif > > if (stream_count && flush) { > PacketListEntry *pktl = si->packet_buffer.head; > diff --git a/libavformat/options.c b/libavformat/options.c > index e4a3aceed0..194042820e 100644 > --- a/libavformat/options.c > +++ b/libavformat/options.c > @@ -190,7 +190,9 @@ FF_ENABLE_DEPRECATION_WARNINGS > return NULL; > } > > +#if FF_API_LAVF_SHORTEST > si->shortest_end = AV_NOPTS_VALUE; > +#endif > > return s; > } > diff --git a/libavformat/options_table.h b/libavformat/options_table.h > index 86d836cfeb..9aacd1ca2b 100644 > --- a/libavformat/options_table.h > +++ b/libavformat/options_table.h > @@ -51,7 +51,9 @@ static const AVOption avformat_options[] = { > {"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, "fflags"}, > {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"}, > {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" }, > -{"shortest", "stop muxing with the shortest stream", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_SHORTEST }, 0, 0, E, "fflags" }, > +#if FF_API_LAVF_SHORTEST > +{"shortest", "stop muxing with the shortest stream (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_SHORTEST }, 0, 0, E, "fflags" }, > +#endif > {"autobsf", "add needed bsfs automatically", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_AUTO_BSF }, 0, 0, E, "fflags" }, > {"seek2any", "allow seeking to non-keyframes on demuxer level when supported", OFFSET(seek2any), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, D}, > {"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D}, > diff --git a/libavformat/version_major.h b/libavformat/version_major.h > index 293fbd3397..e7e80184f7 100644 > --- a/libavformat/version_major.h > +++ b/libavformat/version_major.h > @@ -45,6 +45,7 @@ > #define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 61) > #define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 61) > #define FF_API_AVFORMAT_IO_CLOSE (LIBAVFORMAT_VERSION_MAJOR < 61) > +#define FF_API_LAVF_SHORTEST (LIBAVFORMAT_VERSION_MAJOR < 61) > > > #define FF_API_R_FRAME_RATE 1 LGTM (with the deprecated flag as noticed by James). - Andreas _______________________________________________ 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".