[Live-devel] Dynamic buffer resizing (fNumTruncatedBytes)
Steve Browne
swbrowne at gmail.com
Thu Dec 6 19:13:07 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. The only post I've really seen talk about
this is here:
http://lists.live555.com/pipermail/live-devel/2009-January/010083.html
It sounded like they came to the same conclusion.
So with that in mind I created a patch that I'm hoping may get incorporated
in a future release. Or at least some incarnation of it. See the attached
file for details. The downside to doing it this way is that you're
potentially allocating multiple times per frame, but I would imagine the
code to reallocate should be allocating larger than what was requested
anyway and its better than nothing.
I made the new parameters for getNextFrame have default values of NULL, but
perhaps the better approach for compatibility would be to add a
getNextFrame2 that has these extra parameters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20121206/9ad280e8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DynamicBuffer.patch
Type: application/octet-stream
Size: 4806 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20121206/9ad280e8/attachment.obj>
More information about the live-devel
mailing list