You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/mux: assert that timestamps are positive after offsetting them
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -518,6 +518,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
pkt->dts += offset;
|
pkt->dts += offset;
|
||||||
if (pkt->pts != AV_NOPTS_VALUE)
|
if (pkt->pts != AV_NOPTS_VALUE)
|
||||||
pkt->pts += offset;
|
pkt->pts += offset;
|
||||||
|
|
||||||
|
av_assert2(pkt->dts == AV_NOPTS_VALUE || pkt->dts >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(s->oformat->flags & (AVFMT_TS_NEGATIVE | AVFMT_NOTIMESTAMPS)) && 0) {
|
if (!(s->oformat->flags & (AVFMT_TS_NEGATIVE | AVFMT_NOTIMESTAMPS)) && 0) {
|
||||||
|
Reference in New Issue
Block a user