summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-07-31 15:06:27 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-07-31 15:06:27 +0000
commit10a7571b0918b0233869b3cb832a5addc200929b (patch)
tree9d2a825fa6be686ec1007e7c1f6846c4a096b6a8 /libavformat
parent29d2dc59f973f9495c703b4cab17ded5c24ab3e8 (diff)
deal with the case where one of pts,dts has wrapped but the other has not
Originally committed as revision 9839 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 87025c13eb..70b7ddcb1d 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -595,6 +595,11 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
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) {