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 ESMTPS id 943A04D70E for ; Sun, 23 Feb 2025 22:09:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 02A3B68CB3A; Mon, 24 Feb 2025 00:07:13 +0200 (EET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A323868CB69 for ; Mon, 24 Feb 2025 00:07:06 +0200 (EET) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2f83a8afcbbso6330214a91.1 for ; Sun, 23 Feb 2025 14:07:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740348424; x=1740953224; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BqBbuxd2QcrPTvtus6sIwiz1hK444+qwZ/vyuePAvPA=; b=QtrFLPqVHXCUxWrPX+s79FGTiI6HGsLSp8InIK25MRFao1LtkA42Xh4Bye0FiFXRjg rpy58s9hDe5u2poB5fh5OZprycpR/rhD+vcvYP7E9zCOtuN68JSq5dHYfDnKhaMs8EpV +PZe/StLmmsb5G7CxB6HEDuERgl2c7eZiqDP/JTcU5Z8BBJgSK3TjwI28oU2ueN9UZPD Tu3jT9N0DqaSMuUqIG9PrC/qUpa+PQbMkKNHb/BKEsjhaVeRhJpcxOdZ/0OxrcnTNCLx g2BLgr1yiWi2MxvzUzYfgf36oa9/noEjKvVy0XQdPVlJSSzdyjtyaAPMXEkhCmsWMopQ a6DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740348424; x=1740953224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BqBbuxd2QcrPTvtus6sIwiz1hK444+qwZ/vyuePAvPA=; b=Yr0gfkVLE1HyN4l+xEwAmupy+Q4d3vqLLSCyuS+e5xhQMWjLQSiuhZZtw3tdqDzK2F IkP75ZvBjslusNn72wA4P+ENan04tZdpvZ76tWdk3eG0jEaJir71hMnUZcJXkoj+8+x4 Kc5v0dcXKGej7RdRfR0xCja0Uj6epEpLeFM3t77RARF6dY6E5oyNVR6+u4fKeIa1ctKu 1BzP0A0bokD423a0EjOqP2WuyddEZVyBmcp1H4ctv7gGf1SnM+Pa7SuI607SGyywVzPk PtlM0lkNJ1sp85eXBPXZrcjfawu38FJW/ft42mvcwSJgxHq3P5cJijWEA0PQ+CIPhU63 fLyA== X-Gm-Message-State: AOJu0Yzz0oBdoTfmyRGwruIdc8kLaqdcnR2D6Ycyai8QUJqvr5FbfU2B HL5Dj1jxdb9qTlCp/l9oQDWmx+TqhjME+EzRdDJMu8IMDVHIF48g0gWJrFhS X-Gm-Gg: ASbGnctE6fMiskmaY230nA/Ri0VKw43I6y9+gmsJiBp84/ktz4QYCA3CxQfwjYgi6jS eURyCUTy7lX67rZflAB62r4FCElDQ8OZzujHatTvjPElCJRcuwjNVGNvI/ME1I2dOcvciK8Q1Th 4EXmrfydxaBeynezFDThikdSO7+4lWIr/xas7LTtcSHeWmrzN7hOdISl+MbDJ6e64UotWhRR91G iyu0d8+egp/WU/S3JWzWHR4yw4BzQxeLMwTOzsMkEdFNIcNYp2YL1+GQhm4c9GwyvVGs8mucaqR 1rveVwvVjiJfzL+MWD4cgchYWD0Jc+bVyVoeYf8ctA== X-Google-Smtp-Source: AGHT+IHTeIviwhvcNwhafprq2fp+o6Rpg1GPkm/q/6igd1kdNkA08O48hnYSYL2pk7DIuZ/H/Jlqaw== X-Received: by 2002:a17:90b:350e:b0:2fa:2133:bc87 with SMTP id 98e67ed59e1d1-2fccc1172demr25713693a91.6.1740348424341; Sun, 23 Feb 2025 14:07:04 -0800 (PST) Received: from localhost.localdomain ([2800:2121:b040:c:b49d:85a5:a7d1:4da6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2fceb04bf70sm5091848a91.16.2025.02.23.14.07.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2025 14:07:03 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 23 Feb 2025 19:06:15 -0300 Message-ID: <20250223220630.18756-16-jamrial@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250223220630.18756-1-jamrial@gmail.com> References: <20250223220630.18756-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 15/30] avformat: remove deprecated FF_API_LAVF_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: Deprecated since 2023-09-18. Signed-off-by: James Almer --- libavformat/avformat.h | 3 --- libavformat/avformat_internal.h | 7 ------ libavformat/mux.c | 38 --------------------------------- libavformat/options.c | 4 ---- libavformat/options_table.h | 3 --- libavformat/version_major.h | 1 - 6 files changed, 56 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 6abdb6d480..a3bb1f1ee3 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1470,9 +1470,6 @@ 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/avformat_internal.h b/libavformat/avformat_internal.h index b114dba659..157252fa90 100644 --- a/libavformat/avformat_internal.h +++ b/libavformat/avformat_internal.h @@ -95,13 +95,6 @@ typedef struct FormatContextInternal { int chapter_ids_monotonic; }; }; - -#if FF_API_LAVF_SHORTEST - /** - * Timestamp of the end of the shortest stream. - */ - int64_t shortest_end; -#endif } FormatContextInternal; static av_always_inline FormatContextInternal *ff_fc_internal(AVFormatContext *s) diff --git a/libavformat/mux.c b/libavformat/mux.c index dde30f89eb..60204f6266 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1025,44 +1025,6 @@ 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) && - fci->shortest_end == AV_NOPTS_VALUE) { - AVPacket *const top_pkt = &si->packet_buffer.head->pkt; - - fci->shortest_end = av_rescale_q(top_pkt->dts, - s->streams[top_pkt->stream_index]->time_base, - AV_TIME_BASE_Q); - } - - if (fci->shortest_end != AV_NOPTS_VALUE) { - while (si->packet_buffer.head) { - PacketListEntry *pktl = si->packet_buffer.head; - AVPacket *const top_pkt = &pktl->pkt; - AVStream *const st = s->streams[top_pkt->stream_index]; - FFStream *const sti = ffstream(st); - int64_t top_dts = av_rescale_q(top_pkt->dts, st->time_base, - AV_TIME_BASE_Q); - - if (fci->shortest_end + 1 >= top_dts) - break; - - si->packet_buffer.head = pktl->next; - if (!si->packet_buffer.head) - si->packet_buffer.tail = NULL; - - if (sti->last_in_packet_buffer == pktl) - sti->last_in_packet_buffer = NULL; - - av_packet_unref(&pktl->pkt); - av_freep(&pktl); - flush = 0; - } - } -#endif - if (stream_count && flush) { PacketListEntry *pktl = si->packet_buffer.head; AVStream *const st = s->streams[pktl->pkt.stream_index]; diff --git a/libavformat/options.c b/libavformat/options.c index c8f3390306..b314cd4a35 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -184,10 +184,6 @@ AVFormatContext *avformat_alloc_context(void) return NULL; } -#if FF_API_LAVF_SHORTEST - fci->shortest_end = AV_NOPTS_VALUE; -#endif - return s; } diff --git a/libavformat/options_table.h b/libavformat/options_table.h index 311880d24d..e2e690fd2a 100644 --- a/libavformat/options_table.h +++ b/libavformat/options_table.h @@ -51,9 +51,6 @@ 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, .unit = "fflags"}, {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, .unit = "fflags"}, {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, .unit = "fflags" }, -#if FF_API_LAVF_SHORTEST -{"shortest", "stop muxing with the shortest stream", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_SHORTEST }, 0, 0, E | AV_OPT_FLAG_DEPRECATED, .unit = "fflags" }, -#endif {"autobsf", "add needed bsfs automatically", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_AUTO_BSF }, 0, 0, E, .unit = "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 7a9b06703d..e189ed90ac 100644 --- a/libavformat/version_major.h +++ b/libavformat/version_major.h @@ -42,7 +42,6 @@ * */ #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 62) -#define FF_API_LAVF_SHORTEST (LIBAVFORMAT_VERSION_MAJOR < 62) #define FF_API_ALLOW_FLUSH (LIBAVFORMAT_VERSION_MAJOR < 62) #define FF_API_AVSTREAM_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 62) -- 2.48.1 _______________________________________________ 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".