Mercurial > libavformat.hg
changeset 2318:e5c3b6e7b6ef libavformat
ignore preroll, it is generally not what AVStream.start_time should contain
author | michael |
---|---|
date | Mon, 06 Aug 2007 20:36:55 +0000 |
parents | 2adc9f64ecfb |
children | 4b2f8d27c8ba |
files | asf.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/asf.c Sun Aug 05 13:44:56 2007 +0000 +++ b/asf.c Mon Aug 06 20:36:55 2007 +0000 @@ -196,7 +196,7 @@ 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 @@ 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);