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
Unified · Split
| @@ -995,7 +995,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt, · 994 unmodified lines | |||
| 995 | const PacketListEntry *const last = sti->last_in_packet_buffer; | 995 | const PacketListEntry *const last = sti->last_in_packet_buffer; |
| 996 | int64_t last_dts; | 996 | int64_t last_dts; |
| 997 | 997 | ||
| 998 | if (!last) | 998 | if (!last || st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) |
| 999 | continue; | 999 | continue; |
| 1000 | 1000 | ||
| 1001 | last_dts = av_rescale_q(last->pkt.dts, | 1001 | last_dts = av_rescale_q(last->pkt.dts, |