[FFmpeg-devel] [PATCH] avformat/movenc: Skip duration check for discontinuous fragments
Michael Niedermayer
michael at niedermayer.cc
Tue Oct 18 19:33:59 EEST 2016
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/movenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d7c7158..50be8ff 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4697,7 +4697,8 @@ static int check_pkt(AVFormatContext *s, AVPacket *pkt)
if (trk->entry) {
ref = trk->cluster[trk->entry - 1].dts;
- } else if (trk->start_dts != AV_NOPTS_VALUE) {
+ } else if ( trk->start_dts != AV_NOPTS_VALUE
+ && !trk->frag_discont) {
ref = trk->start_dts + trk->track_duration;
} else
ref = pkt->dts; // Skip tests for the first packet
--
2.10.1
More information about the ffmpeg-devel
mailing list