|
@@ -2993,7 +2993,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){
|
|
pkt->dts= st->pts_buffer[0];
|
|
pkt->dts= st->pts_buffer[0];
|
|
}
|
|
}
|
|
|
|
|
|
- if(st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && st->cur_dts >= pkt->dts){
|
|
|
|
|
|
+ if(st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && ((!(s->oformat->flags & AVFMT_TS_NONSTRICT) && st->cur_dts >= pkt->dts) || st->cur_dts > pkt->dts)){
|
|
av_log(s, AV_LOG_ERROR,
|
|
av_log(s, AV_LOG_ERROR,
|
|
"Application provided invalid, non monotonically increasing dts to muxer in stream %d: %"PRId64" >= %"PRId64"\n",
|
|
"Application provided invalid, non monotonically increasing dts to muxer in stream %d: %"PRId64" >= %"PRId64"\n",
|
|
st->index, st->cur_dts, pkt->dts);
|
|
st->index, st->cur_dts, pkt->dts);
|