History

avformat: remove deprecated FF_API_LAVF_SHORTEST

Deprecated since 2023-09-18.

James Almer committed 1 year ago

Commit 3fd10e01 parent 8a7ce396 files · +0 −56Browse files

Unified · Split

6 files
  1. libavformat/avformat.h +0 −3
  2. libavformat/avformat_internal.h +0 −7
  3. libavformat/mux.c +0 −38
  4. libavformat/options.c +0 −4
  5. libavformat/options_table.h +0 −3
  6. libavformat/version_major.h +0 −1
libavformat/avformat.h+0−3
@@ -1470,9 +1470,6 @@ typedef struct AVFormatContext { · 1469 unmodified lines
14701470 #define AVFMT_FLAG_BITEXACT 0x0400
14711471 #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
14721472 #define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats
1473−#if FF_API_LAVF_SHORTEST
1474−#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops.
1475−#endif
14761473 #define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer
14771474
14781475 /**
libavformat/avformat_internal.h+0−7
@@ -95,13 +95,6 @@ typedef struct FormatContextInternal { · 94 unmodified lines
9595 int chapter_ids_monotonic;
9696 };
9797 };
98−
99−#if FF_API_LAVF_SHORTEST
100− /**
101− * Timestamp of the end of the shortest stream.
102− */
103− int64_t shortest_end;
104−#endif
10598 } FormatContextInternal;
10699
107100 static av_always_inline FormatContextInternal *ff_fc_internal(AVFormatContext *s)
libavformat/mux.c+0−38
@@ -1025,44 +1025,6 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt, · 1024 unmodified lines
10251025 }
10261026 }
10271027
1028−#if FF_API_LAVF_SHORTEST
1029− if (si->packet_buffer.head &&
1030− eof &&
1031− (s->flags & AVFMT_FLAG_SHORTEST) &&
1032− fci->shortest_end == AV_NOPTS_VALUE) {
1033− AVPacket *const top_pkt = &si->packet_buffer.head->pkt;
1034−
1035− fci->shortest_end = av_rescale_q(top_pkt->dts,
1036− s->streams[top_pkt->stream_index]->time_base,
1037− AV_TIME_BASE_Q);
1038− }
1039−
1040− if (fci->shortest_end != AV_NOPTS_VALUE) {
1041− while (si->packet_buffer.head) {
1042− PacketListEntry *pktl = si->packet_buffer.head;
1043− AVPacket *const top_pkt = &pktl->pkt;
1044− AVStream *const st = s->streams[top_pkt->stream_index];
1045− FFStream *const sti = ffstream(st);
1046− int64_t top_dts = av_rescale_q(top_pkt->dts, st->time_base,
1047− AV_TIME_BASE_Q);
1048−
1049− if (fci->shortest_end + 1 >= top_dts)
1050− break;
1051−
1052− si->packet_buffer.head = pktl->next;
1053− if (!si->packet_buffer.head)
1054− si->packet_buffer.tail = NULL;
1055−
1056− if (sti->last_in_packet_buffer == pktl)
1057− sti->last_in_packet_buffer = NULL;
1058−
1059− av_packet_unref(&pktl->pkt);
1060− av_freep(&pktl);
1061− flush = 0;
1062− }
1063− }
1064−#endif
1065−
10661028 if (stream_count && flush) {
10671029 PacketListEntry *pktl = si->packet_buffer.head;
10681030 AVStream *const st = s->streams[pktl->pkt.stream_index];
libavformat/options.c+0−4
@@ -184,10 +184,6 @@ AVFormatContext *avformat_alloc_context(void) · 183 unmodified lines
184184 return NULL;
185185 }
186186
187−#if FF_API_LAVF_SHORTEST
188− fci->shortest_end = AV_NOPTS_VALUE;
189−#endif
190−
191187 return s;
192188 }
193189
libavformat/options_table.h+0−3
@@ -51,9 +51,6 @@ static const AVOption avformat_options[] = { · 50 unmodified lines
5151 {"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, .unit = "fflags"},
5252 {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, .unit = "fflags"},
5353 {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, .unit = "fflags" },
54−#if FF_API_LAVF_SHORTEST
55−{"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" },
56−#endif
5754 {"autobsf", "add needed bsfs automatically", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_AUTO_BSF }, 0, 0, E, .unit = "fflags" },
5855 {"seek2any", "allow seeking to non-keyframes on demuxer level when supported", OFFSET(seek2any), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, D},
5956 {"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},
libavformat/version_major.h+0−1
@@ -42,7 +42,6 @@ · 41 unmodified lines
4242 *
4343 */
4444 #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 62)
45−#define FF_API_LAVF_SHORTEST (LIBAVFORMAT_VERSION_MAJOR < 62)
4645 #define FF_API_ALLOW_FLUSH (LIBAVFORMAT_VERSION_MAJOR < 62)
4746 #define FF_API_AVSTREAM_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 62)
4847

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t