Mercurial > libavformat.hg
changeset 4371:6957efa06a1b libavformat
let packet pass through when no timestamps
author | bcoudurier |
---|---|
date | Tue, 03 Feb 2009 23:18:12 +0000 |
parents | 6c34e8045dc7 |
children | 6d94691fff91 |
files | utils.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Tue Feb 03 23:11:13 2009 +0000 +++ b/utils.c Tue Feb 03 23:18:12 2009 +0000 @@ -2614,6 +2614,9 @@ 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 @@ 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(;;){