[Live-devel] Dynamic buffer resizing (fNumTruncatedBytes)

Ross Finlayson finlayson at live555.com
Fri Dec 7 22:22:03 PST 2012


> It doesn't seem like there's a way to dynamically resize buffers without losing data because in the afterGettingFunc if fNumTruncatedBytes > 0 you've already lost the data.

That's correct.

> So with that in mind I created a patch that I'm hoping may get incorporated in a future release.

No, because the choice of how to handle the 'truncated data' situation is best left up to the receiver.  As you noted, the data has been lost, but the receiver *may* then choose to allocate a larger-sized to use in subsequent calls to "getNextFrame()" (e.g., VLC does this), or it might not.

In any case, we're not going to change the signature to "getNextFrame()", because it's used throughout the code - not just in the couple of places you noted.

(It's possible that we'll completely change the way we handle buffers in some future revision of the software, but if that ever happens, it'll be a major, non-backwards-compatible revision.)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20121207/64895c66/attachment.html>


More information about the live-devel mailing list