mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-17 15:08:09 +08:00
avformat: remove deprecated FF_API_LAVF_SHORTEST
Deprecated since 2023-09-18. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@ -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
|
||||
|
||||
/**
|
||||
|
@ -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)
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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},
|
||||
|
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user