Commit 74383def authored by Martin Storsjö's avatar Martin Storsjö

movenc: Handle pts == NOPTS when autoflushing

This muxer generally handles pts == NOPTS by using dts instead;
do this for consistency here as well.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 0abb07ba
...@@ -3635,7 +3635,10 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -3635,7 +3635,10 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
// duration, but only helps for this particular track, not // duration, but only helps for this particular track, not
// for the other ones that are flushed at the same time. // for the other ones that are flushed at the same time.
trk->track_duration = pkt->dts - trk->start_dts; 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); mov_auto_flush_fragment(s, 0);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment