aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-04-26 10:59:05 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-05-03 16:28:08 -0400
commitff499157a11046a59f88646a2541bd6c170f1804 (patch)
treeef23b80437fd80e5e75df9ce83a178ad3e4bd69c
parent1d4a01474d54a4d3bb59dc94d285334f7bcbd889 (diff)
downloadffmpeg-ff499157a11046a59f88646a2541bd6c170f1804.tar.gz
avformat: remove a workaround for broken timestamps
This modifies pts in situations other than what was intended, leading to invalid timestamps. Reverts commit 90bb394dccacd10607153833a0aeba0d970dc8db
-rw-r--r--libavformat/utils.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index b167e96854..31708cfaa7 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -985,15 +985,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
}
}
- if(pkt->pts != AV_NOPTS_VALUE && duration){
- int64_t old_diff= FFABS(st->cur_dts - duration - pkt->pts);
- int64_t new_diff= FFABS(st->cur_dts - pkt->pts);
- if(old_diff < new_diff && old_diff < (duration>>3)){
- pkt->pts += duration;
- // av_log(NULL, AV_LOG_DEBUG, "id:%d old:%"PRId64" new:%"PRId64" dur:%d cur:%"PRId64" size:%d\n", pkt->stream_index, old_diff, new_diff, pkt->duration, st->cur_dts, pkt->size);
- }
- }
-
/* presentation is not delayed : PTS and DTS are the same */
if(pkt->pts == AV_NOPTS_VALUE)
pkt->pts = pkt->dts;