diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-12 14:27:30 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-12 14:27:34 +0100 |
commit | ee96b7b1c656434b35f3d2dc73ae65e723aa5d2a (patch) | |
tree | c20366c3fb98380f376c9856cace719e7c8850c3 | |
parent | a022c1fe76f3b0cd20336f1092942ffcfa5a4572 (diff) | |
parent | 74383def8f46805faf3391c98516b248108a9a6b (diff) | |
download | ffmpeg-ee96b7b1c656434b35f3d2dc73ae65e723aa5d2a.tar.gz |
Merge commit '74383def8f46805faf3391c98516b248108a9a6b'
* commit '74383def8f46805faf3391c98516b248108a9a6b':
movenc: Handle pts == NOPTS when autoflushing
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r-- | libavformat/movenc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 3d62003872..0186c4f068 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4721,7 +4721,10 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt) // duration, but only helps for this particular track, not // for the other ones that are flushed at the same time. trk->track_duration = pkt->dts - trk->start_dts; - trk->end_pts = pkt->pts; + if (pkt->pts != AV_NOPTS_VALUE) + trk->end_pts = pkt->pts; + else + trk->end_pts = pkt->dts; mov_auto_flush_fragment(s, 0); } } |