Message ID | 20161018163359.25106-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 18ad44d14548a54e0e7926c97ab15d3daafaf771 |
Headers | show |
On Tue, Oct 18, 2016 at 06:33:59PM +0200, Michael Niedermayer wrote: > Found-by: Daemon404 > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/movenc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) applied [...]
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
Found-by: Daemon404 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/movenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)