Mercurial > libavformat.hg
comparison utils.c @ 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 | acdc747b9ff3 |
comparison
equal
deleted
inserted
replaced
2294:80a123ce1501 | 2295:09176aa7014c |
---|---|
593 AVCodecParserContext *pc, AVPacket *pkt) | 593 AVCodecParserContext *pc, AVPacket *pkt) |
594 { | 594 { |
595 int num, den, presentation_delayed, delay, i; | 595 int num, den, presentation_delayed, delay, i; |
596 int64_t offset; | 596 int64_t offset; |
597 | 597 |
598 if(pkt->pts != AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && pkt->dts > pkt->pts && st->pts_wrap_bits<63 | |
599 /*&& pkt->dts-(1LL<<st->pts_wrap_bits) < pkt->pts*/){ | |
600 pkt->dts -= 1LL<<st->pts_wrap_bits; | |
601 } | |
602 | |
598 if (pkt->duration == 0) { | 603 if (pkt->duration == 0) { |
599 compute_frame_duration(&num, &den, st, pc, pkt); | 604 compute_frame_duration(&num, &den, st, pc, pkt); |
600 if (den && num) { | 605 if (den && num) { |
601 pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.num); | 606 pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.num); |
602 } | 607 } |