Commit 4f0f9bdd authored by Baptiste Coudurier's avatar Baptiste Coudurier

let packet pass through when no timestamps

Originally committed as revision 16982 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 832404ce
...@@ -2614,6 +2614,9 @@ int ff_interleave_compare_dts(AVFormatContext *s, AVPacket *next, AVPacket *pkt) ...@@ -2614,6 +2614,9 @@ int ff_interleave_compare_dts(AVFormatContext *s, AVPacket *next, AVPacket *pkt)
int64_t left = st2->time_base.num * (int64_t)st ->time_base.den; 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; 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 return next->dts * left > pkt->dts * right; //FIXME this can overflow
} }
...@@ -2676,7 +2679,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){ ...@@ -2676,7 +2679,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){
if(compute_pkt_fields2(st, pkt) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) if(compute_pkt_fields2(st, pkt) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
return -1; return -1;
if(pkt->dts == AV_NOPTS_VALUE) if(pkt->dts == AV_NOPTS_VALUE && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
return -1; return -1;
for(;;){ for(;;){
......
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