Browse Source

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
tags/v0.5
Michael Niedermayer 18 years ago
parent
commit
48a59dfe8e
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/utils.c

+ 3
- 0
libavformat/utils.c View File

@@ -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;
}
}



Loading…
Cancel
Save