diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-03 23:18:12 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-03 23:18:12 +0000 |
commit | 4f0f9bddacfd1abf0cb353091c3b4be410961690 (patch) | |
tree | e082deed230dfaf97b088e3fd9e4ded6413b6d45 | |
parent | 832404cea798c913ef57654c4b8326dc4b8adf91 (diff) | |
download | ffmpeg-4f0f9bddacfd1abf0cb353091c3b4be410961690.tar.gz |
let packet pass through when no timestamps
Originally committed as revision 16982 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index be8553bc34..5859305370 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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 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 } @@ -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)) return -1; - if(pkt->dts == AV_NOPTS_VALUE) + if(pkt->dts == AV_NOPTS_VALUE && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) return -1; for(;;){ |