[Live-devel] Converting H.264 RTP Video to MPEG-2 Transport Stream

Ross Finlayson finlayson at live555.com
Thu Apr 12 17:45:53 PDT 2012


> Although it works fine, but noticed that there is a memory copy which I think is redundant. I have tried to let fTo point directly to fInputBuffer, but that caused  the generated data full of garbage. I don't known why. who will use fTo later and where is fTo's initialization?

"fTo" is a pointer to the buffer that is provided to you by the downstream object (i.e., the object that you're delivering the data to).  You *must* copy the data into this location (and also set "fFrameSize" appropriately).  You don't change the value of "fTo"; instead, you copy data to this pointer.

(This is explained more in "liveMedia/DeviceSource.cpp".)


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/20120413/8530edf6/attachment.html>


More information about the live-devel mailing list