Originally committed as revision 16982 to svn://svn.ffmpeg.org/ffmpeg/trunk
int64_t left = st2->time_base.num * (int64_t)st ->time_base.den;
int64_t right= st ->time_base.num * (int64_t)st2->time_base.den;
+ if (pkt->dts == AV_NOPTS_VALUE)
+ return 0;
+
return next->dts * left > pkt->dts * right; //FIXME this can overflow
}
if(compute_pkt_fields2(st, pkt) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
return -1;
- if(pkt->dts == AV_NOPTS_VALUE)
+ if(pkt->dts == AV_NOPTS_VALUE && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
return -1;
for(;;){