summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg.c
diff options
context:
space:
mode:
authorHans Carlson <forbyta at gmx.com>2018-06-21 14:24:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-06-23 01:06:29 +0200
commita790813739a880a0a86084ec8c4e2d5a6a79c11d (patch)
tree54a767797ab83a8cb5f90fac9d499af23ada2bf6 /fftools/ffmpeg.c
parent540e8c2d641bf90fc28e47e170f8c0b1962197e9 (diff)
downloadffmpeg-a790813739a880a0a86084ec8c4e2d5a6a79c11d.tar.gz
ffmpeg: Treat subtitles like audio and video for non-monotonic dts.
Fixes ticket #4450. Fixes ticket #6248. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r--fftools/ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 6dfab64bc7..8d311a9ac8 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -772,7 +772,7 @@ static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int u
- FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1)
- FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1);
}
- if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) &&
+ if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) &&
pkt->dts != AV_NOPTS_VALUE &&
!(st->codecpar->codec_id == AV_CODEC_ID_VP9 && ost->stream_copy) &&
ost->last_mux_dts != AV_NOPTS_VALUE) {