diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-08-04 22:54:46 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-04 22:54:46 +0000 |
commit | 48a59dfe8e2483b201adfa4ceead3755eb8bf824 (patch) | |
tree | b7715e759e77e0127551e8c6addaa5ed6e387232 /libavformat | |
parent | 82583548496de830aafeb8264a7b0c56e0d5b600 (diff) | |
download | ffmpeg-48a59dfe8e2483b201adfa4ceead3755eb8bf824.tar.gz |
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
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 3 |
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; } } |