diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-08-06 20:36:55 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-06 20:36:55 +0000 |
commit | 371bf80642a2867dd6c322f249025f6cbbf23d3e (patch) | |
tree | 35af00300c30ea48ac3b2b84d1e6234708247d41 /libavformat/asf.c | |
parent | 00a254b7fe97eabedd58d5ea205e8a3fb8c73e80 (diff) | |
download | ffmpeg-371bf80642a2867dd6c322f249025f6cbbf23d3e.tar.gz |
ignore preroll, it is generally not what AVStream.start_time should contain
Originally committed as revision 9963 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 54ced89db0..60bb37a749 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -196,7 +196,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) int type, type_specific_size, sizeX; uint64_t total_size; unsigned int tag1; - int64_t pos1, pos2; + int64_t pos1, pos2, start_time; int test_for_ext_stream_audio, is_dvr_ms_audio=0; pos1 = url_ftell(pb); @@ -209,10 +209,11 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) if (!asf_st) goto fail; st->priv_data = asf_st; - st->start_time = asf->hdr.preroll; + start_time = asf->hdr.preroll; + if(!(asf->hdr.flags & 0x01)) { // if we aren't streaming... st->duration = asf->hdr.send_time / - (10000000 / 1000) - st->start_time; + (10000000 / 1000) - start_time; } get_guid(pb, &g); |