summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-29 13:14:29 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-29 13:14:29 +0200
commitf7bc03bcaff5b15e566110f73db0f1fc0d24a717 (patch)
tree9b1be293ffcc1c2ede7d6dc1b99714be87fc8799 /libavformat/utils.c
parent5fb652dddb79feabec91002ed6f5accb6ccb633d (diff)
parentc5b46a064d9991f2cd045c90179fccf35ecffc34 (diff)
Merge commit 'c5b46a064d9991f2cd045c90179fccf35ecffc34'
* commit 'c5b46a064d9991f2cd045c90179fccf35ecffc34': lavf: Don't interpret just slightly broken timestamps as wraparound Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 9fd5e6e3e5..f798510b07 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1017,7 +1017,9 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
pc && pc->pict_type != AV_PICTURE_TYPE_B)
presentation_delayed = 1;
- if(pkt->pts != AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && st->pts_wrap_bits<63 && pkt->dts - (1LL<<(st->pts_wrap_bits-1)) > pkt->pts){
+ if (pkt->pts != AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE &&
+ st->pts_wrap_bits < 63 &&
+ pkt->dts - (1LL << (st->pts_wrap_bits - 1)) > pkt->pts) {
if(is_relative(st->cur_dts) || pkt->dts - (1LL<<(st->pts_wrap_bits-1)) > st->cur_dts) {
pkt->dts -= 1LL<<st->pts_wrap_bits;
} else