# HG changeset patch # User alex # Date 1173233012 0 # Node ID 490aa34aef0f8ad9b44a0f9999d75553d9c850d2 # Parent cf8db4fe9efa870b57b6d4f4a141997812f6267c move preroll_time from static variable into definition, might be a good idea moving this into the context and making user-settable diff -r cf8db4fe9efa -r 490aa34aef0f asf-enc.c --- a/asf-enc.c Wed Mar 07 01:52:08 2007 +0000 +++ b/asf-enc.c Wed Mar 07 02:03:32 2007 +0000 @@ -194,7 +194,7 @@ { CODEC_ID_NONE, 0 }, }; -static int preroll_time = 3100; +#define PREROLL_TIME 3100 static void put_guid(ByteIOContext *s, const GUID *g) { @@ -278,7 +278,7 @@ int bit_rate; int64_t duration; - duration = asf->duration + preroll_time * 10000; + duration = asf->duration + PREROLL_TIME * 10000; has_title = (s->title[0] || s->author[0] || s->copyright[0] || s->comment[0]); bit_rate = 0; @@ -310,7 +310,7 @@ put_le64(pb, asf->nb_packets); /* number of packets */ put_le64(pb, duration); /* end time stamp (in 100ns units) */ put_le64(pb, asf->duration); /* duration (in 100ns units) */ - put_le64(pb, preroll_time); /* start time stamp */ + put_le64(pb, PREROLL_TIME); /* start time stamp */ put_le32(pb, asf->is_streamed ? 3 : 2); /* ??? */ put_le32(pb, asf->packet_size); /* packet size */ put_le32(pb, asf->packet_size); /* packet size */ @@ -690,7 +690,7 @@ else if (payload_len == (frag_len1 - 1)) payload_len = frag_len1 - 2; //additional byte need to put padding length - put_payload_header(s, stream, timestamp+preroll_time, m_obj_size, m_obj_offset, payload_len, flags); + put_payload_header(s, stream, timestamp+PREROLL_TIME, m_obj_size, m_obj_offset, payload_len, flags); put_buffer(&asf->pb, buf, payload_len); if (asf->multi_payloads_present)