avformat/movenc: Skip duration check for discontinuous fragments

Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-10-18 18:18:49 +02:00
parent 6498549fd7
commit 18ad44d145
1 changed files with 2 additions and 1 deletions

View File

@ -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