mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
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: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
0abb07bad7
commit
74383def8f
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user