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
This commit is contained in:
Anton Khirnov 2023-10-31 13:19:04 +01:00
parent 436b972fc8
commit de85815bfa

View File

@ -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,