[Live-devel] Report one possible bug about function createJPEGHeader()

Ross Finlayson finlayson at live555.com
Mon Jun 17 22:31:46 PDT 2013


>     About the implementation of function createJPEGHeader() in file JPEGVideoRTPSource.cpp, the 1st time the formula of determining the value of variable "tableSize" is:
> 
> unsigned tableSize = numQtables == 1 ? qtlen : qtlen/2;
> 
>     I think it should be:
> 
> unsigned tableSize = numQtables == 1 ? qtlen/2 : qtlen;

No, because "qtlen" is the total length of all of the (1 or 2) quantization tables, and (the computed) "tableSize" is intended to be the size of a single table.  The existing code is correct.

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/20130617/a97047b6/attachment.html>


More information about the live-devel mailing list