fix first timestamp when decoding mpeg-ps

Originally committed as revision 3274 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2004-06-30 17:34:15 +00:00
parent 641aa661f6
commit 0ff7199f59
2 changed files with 9 additions and 2 deletions

View File

@@ -1326,8 +1326,15 @@ static void av_estimate_timings_from_pts(AVFormatContext *ic)
/* flush packet queue */
flush_packet_queue(ic);
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
if (st->parser) {
av_parser_close(st->parser);
st->parser= NULL;
}
}
/* we read the first packets to get the first PTS (not fully
accurate, but it is enough now) */
url_fseek(&ic->pb, 0, SEEK_SET);