2018-06-21 13:55 GMT+02:00, Moritz Barsnick <[email protected]>:
> On Thu, Jun 21, 2018 at 10:51:33 +0200, Carl Eugen Hoyos wrote:
>> Who wrote the patch / where did you find it?
>
> The ticket he mentioned was #4450, the patch is here:
> https://trac.ffmpeg.org/ticket/4450#comment:6
Patch attached (untested).
Thank you, Carl Eugen
From 6ff1a1c662211548ae3c8c01ddfc2775e03b2497 Mon Sep 17 00:00:00 2001
From: Hans Carlson <forbyta at gmx.com>
Date: Thu, 21 Jun 2018 14:24:36 +0200
Subject: [PATCH] ffmpeg: Treat subtitles like audio and video for
non-monotonic dts.
Fixes ticket #4450.
Fixes ticket #6248.
---
fftools/ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 6dfab64..8d311a9 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) {
--
1.7.10.4
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel