
On Wed, Mar 01, 2006 at 04:02:59PM +0200, Oded Shimon wrote:
On Tue, Feb 28, 2006 at 10:34:22PM +0100, Michael Niedermayer wrote:
3. split index simplification for lavf muxer currently we just write the data out seek back and update the forward pointer, this is safe as long as the packet is < the io buffer size in lavf, if its larger we need to alloc&realloc a buffer and work within that or do 2 passes to find the forward ptr value, both are more messy
BTW, just wanted to note, you DO know that vorbis headers are usually ~4kb and can actually be any arbitrary size, so the stream headers and just about any nut packet can be any arbitrary size... So you need to support it anyway, regardless of index...
Nonsense. The buffer containing the stream headers and packets is provided by the caller (possibly as different unit in an embedded system) and thus never requires an allocation by the muxer. If your implementation uses an allocation and copies it to do the write, this is an implementation issue of yours, not any general problem. Same goes for many other things. You can know the size without buffering the contents yourself. If there are cases where this does not apply, it's a bug in the spec and should be fixed. But issues with your implementation are not bugs in the spec, unless they reflect that an ideal implementation would be extremely difficult or overly complex. Rich