summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-01-29 02:27:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-01-29 02:27:33 +0000
commita603bf8d68b8700faa0008af09ccb653082f89de (patch)
tree728ac79c706eb2eadf068440e4e661209b78e95e /libavformat/utils.c
parentbf1f4da01f9005d8a31b2761233fd99ea17c52a2 (diff)
dont predict missing timestamps if we lack the required information to do so
Originally committed as revision 3898 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 92f412105c..3f74ed529b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -745,7 +745,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
st->last_IP_pts= pkt->pts;
/* cannot compute PTS if not present (we can compute it only
by knowing the futur */
- } else {
+ } else if(pkt->pts != AV_NOPTS_VALUE || pkt->dts != AV_NOPTS_VALUE || pkt->duration){
if(pkt->pts != AV_NOPTS_VALUE && pkt->duration){
int64_t old_diff= ABS(st->cur_dts - pkt->duration - pkt->pts);
int64_t new_diff= ABS(st->cur_dts - pkt->pts);