aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-10-31 13:19:04 +0100
committerAnton Khirnov <anton@khirnov.net>2023-11-14 18:18:26 +0100
commitde85815bfaa3e25b7ea46ffc837983df216fcd1b (patch)
tree12c8941b54c7a9f13d62a35162d3504210ac267b
parent436b972fc82ea40e8dcdd1981605250c155ba321 (diff)
downloadffmpeg-de85815bfaa3e25b7ea46ffc837983df216fcd1b.tar.gz
lavf/mux: do not apply max_interleave_delta to subtitles
It is common for subtitle streams to have large gaps between packets. When the caller is interleaving packets from multiple files, it can easily happen that two successive subtitle packets trigger this limit, even though no excessive buffering is happening. Should fix #7064
-rw-r--r--libavformat/mux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index c7877c5d98..de10d2c008 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -995,7 +995,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt,
const PacketListEntry *const last = sti->last_in_packet_buffer;
int64_t last_dts;
- if (!last)
+ if (!last || st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE)
continue;
last_dts = av_rescale_q(last->pkt.dts,