# HG changeset patch # User michael # Date 1185894387 0 # Node ID 09176aa7014cc7af9455c304980707e2ebd06a6b # Parent 80a123ce1501cc89f5465a3cc7a550a591eb4eec deal with the case where one of pts,dts has wrapped but the other has not diff -r 80a123ce1501 -r 09176aa7014c utils.c --- 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<pts_wrap_bits) < pkt->pts*/){ + pkt->dts -= 1LL<pts_wrap_bits; + } + if (pkt->duration == 0) { compute_frame_duration(&num, &den, st, pc, pkt); if (den && num) {