summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-08-04 22:54:46 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-08-04 22:54:46 +0000
commit48a59dfe8e2483b201adfa4ceead3755eb8bf824 (patch)
treeb7715e759e77e0127551e8c6addaa5ed6e387232
parent82583548496de830aafeb8264a7b0c56e0d5b600 (diff)
set a more reasonable start_time if the first timestamps are AV_NOPTS_VALUE
Originally committed as revision 9918 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c4ade6f33e..b5693b5da3 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -608,6 +608,9 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index, int6
if(pktl->pkt.dts != AV_NOPTS_VALUE)
pktl->pkt.dts += st->first_dts;
+
+ if(st->start_time == AV_NOPTS_VALUE && pktl->pkt.pts != AV_NOPTS_VALUE)
+ st->start_time= pktl->pkt.pts;
}
}