blob: a6fd2f030744195dd16c83bfb92d1d24df968378 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- mux.c 2016-09-01 14:21:01.254840644 +0100
+++ new/mux.c 2016-09-01 14:18:01.000000000 +0100
@@ -597,11 +597,11 @@
pkt->dts = st->pts_buffer[0];
}
- if (st->cur_dts && st->cur_dts != AV_NOPTS_VALUE &&
- ((!(s->oformat->flags & AVFMT_TS_NONSTRICT) &&
- st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE &&
- st->codecpar->codec_type != AVMEDIA_TYPE_DATA &&
- st->cur_dts >= pkt->dts) || st->cur_dts > pkt->dts)) {
+// RF This patch helps prevent ffmpeg exiting unecessarily due to DTS issues in subtitles.
+// My idea is that DTS issues don't matter for subs, they only use PTS. In any case timing not mega critical.
+
+// if (st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && ((!(s->oformat->flags & AVFMT_TS_NONSTRICT) && st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE && st->codecpar->codec_type != AVMEDIA_TYPE_DATA && st->cur_dts >= pkt->dts) || st->cur_dts > pkt->dts)) {
+ if (st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && ((!(s->oformat->flags & AVFMT_TS_NONSTRICT) && st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE && st->codecpar->codec_type != AVMEDIA_TYPE_DATA && st->cur_dts >= pkt->dts) || (st->cur_dts > pkt->dts && st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE && st->codecpar->codec_type != AVMEDIA_TYPE_DATA))) {
av_log(s, AV_LOG_ERROR,
"Application provided invalid, non monotonically increasing dts to muxer in stream %d: %s >= %s\n",
st->index, av_ts2str(st->cur_dts), av_ts2str(pkt->dts));
|