Mercurial > libavformat.hg
changeset 2295:09176aa7014c libavformat
deal with the case where one of pts,dts has wrapped but the other has not
author | michael |
---|---|
date | Tue, 31 Jul 2007 15:06:27 +0000 |
parents | 80a123ce1501 |
children | 0cfc556604e3 |
files | utils.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Mon Jul 30 18:57:47 2007 +0000 +++ b/utils.c Tue Jul 31 15:06:27 2007 +0000 @@ -595,6 +595,11 @@ int num, den, presentation_delayed, delay, i; int64_t offset; + if(pkt->pts != AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && pkt->dts > pkt->pts && st->pts_wrap_bits<63 + /*&& pkt->dts-(1LL<<st->pts_wrap_bits) < pkt->pts*/){ + pkt->dts -= 1LL<<st->pts_wrap_bits; + } + if (pkt->duration == 0) { compute_frame_duration(&num, &den, st, pc, pkt); if (den && num) {