Deprecated since 2023-09-18.
Unified · Split
| @@ -1470,9 +1470,6 @@ typedef struct AVFormatContext { · 1469 unmodified lines | ||
| 1470 | 1470 | #define AVFMT_FLAG_BITEXACT 0x0400 |
| 1471 | 1471 | #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) |
| 1472 | 1472 | #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 | |
| 1476 | 1473 | #define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer |
| 1477 | 1474 | |
| 1478 | 1475 | /** |
| @@ -95,13 +95,6 @@ typedef struct FormatContextInternal { · 94 unmodified lines | ||
| 95 | 95 | int chapter_ids_monotonic; |
| 96 | 96 | }; |
| 97 | 97 | }; |
| 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 | |
| 105 | 98 | } FormatContextInternal; |
| 106 | 99 | |
| 107 | 100 | static av_always_inline FormatContextInternal *ff_fc_internal(AVFormatContext *s) |
| @@ -1025,44 +1025,6 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt, · 1024 unmodified lines | ||
| 1025 | 1025 | } |
| 1026 | 1026 | } |
| 1027 | 1027 | |
| 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 | − | |
| 1066 | 1028 | if (stream_count && flush) { |
| 1067 | 1029 | PacketListEntry *pktl = si->packet_buffer.head; |
| 1068 | 1030 | AVStream *const st = s->streams[pktl->pkt.stream_index]; |
| @@ -184,10 +184,6 @@ AVFormatContext *avformat_alloc_context(void) · 183 unmodified lines | ||
| 184 | 184 | return NULL; |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | −#if FF_API_LAVF_SHORTEST | |
| 188 | − fci->shortest_end = AV_NOPTS_VALUE; | |
| 189 | −#endif | |
| 190 | − | |
| 191 | 187 | return s; |
| 192 | 188 | } |
| 193 | 189 | |
| @@ -51,9 +51,6 @@ static const AVOption avformat_options[] = { · 50 unmodified lines | ||
| 51 | 51 | {"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, .unit = "fflags"}, |
| 52 | 52 | {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, .unit = "fflags"}, |
| 53 | 53 | {"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 | |
| 57 | 54 | {"autobsf", "add needed bsfs automatically", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_AUTO_BSF }, 0, 0, E, .unit = "fflags" }, |
| 58 | 55 | {"seek2any", "allow seeking to non-keyframes on demuxer level when supported", OFFSET(seek2any), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, D}, |
| 59 | 56 | {"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 @@ · 41 unmodified lines | ||
| 42 | 42 | * |
| 43 | 43 | */ |
| 44 | 44 | #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 62) |
| 45 | −#define FF_API_LAVF_SHORTEST (LIBAVFORMAT_VERSION_MAJOR < 62) | |
| 46 | 45 | #define FF_API_ALLOW_FLUSH (LIBAVFORMAT_VERSION_MAJOR < 62) |
| 47 | 46 | #define FF_API_AVSTREAM_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 62) |
| 48 | 47 | |