Commit 647f306b authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mux: assert that timestamps are positive after offsetting them

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c329195a
......@@ -518,6 +518,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
pkt->dts += offset;
if (pkt->pts != AV_NOPTS_VALUE)
pkt->pts += offset;
av_assert2(pkt->dts == AV_NOPTS_VALUE || pkt->dts >= 0);
}
if (!(s->oformat->flags & (AVFMT_TS_NEGATIVE | AVFMT_NOTIMESTAMPS)) && 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