On Thu, Apr 15, 2010 at 3:13 AM, <span dir="ltr"><<a href="mailto:dirk.raffel@de.transport.bombardier.com" target="_blank">dirk.raffel@de.transport.bombardier.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><font face="sans-serif" size="2">Hello everyone,</font>
<br>
<br><font face="sans-serif" size="2">First, let me say that I'm totally new
to Live555 and multimedia streaming in general. I'm planning to build an
on-demand RTSP server for streaming WAV and/or MP3 files via RTP unicast
to an RTSP client.</font>
<br>
<br><font face="sans-serif" size="2">I've built and tried the TestOnDemandRTSPServer
in the testProgs directory. Streaming a WAV file works flawless, but when
streaming a MP3 file I get the error</font>
<br>
<br><font face="sans-serif" size="2">SegmentQueue::enqueueNewSegment() overflow</font>
<br>
<br><font face="sans-serif" size="2">which is generated in MP3ADU.cpp. While
increasing SegmentQueueSize obviously helps in avoiding this error, there
are still a lot of "gaps" in the playback.</font>
<br></blockquote><div><br>When I ran Live555 through static code analysis, a bunch of stuff in the MP3 portions of the library was flagged, including several potential buffer overflows. I didn't do anything about it because I don't use MP3 (sorry) but some of the stuff could definitely be related to your overflow:<br>
<br>Warning 5 warning C6385: Invalid data: accessing 'fSegments->s', the readable size is '20320' bytes, but '1572768' bytes might be read: Lines: 173, 174, 175, 177, 181, 182, 185, 189, 197, 198, 199, 200, 203, 205, 213, 215, 220, 222, 225, 226, 227, 228, 229, 230, 231, 234, 240, 244, 245, 246 mp3adu.cpp 246<br>
Warning 6 warning C6246: Local declaration of 'bytesToZero' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '442' of 'mp3adu.cpp': Lines: 442 mp3adu.cpp 471<br>
Warning 12 warning C4996: 'fdopen': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _fdopen. See online help for details. MP3HTTPSource.cpp 55<br>Warning 28 warning C6386: Buffer overrun: accessing '<a href="http://si.ch">si.ch</a>', the writable size is '480' bytes, but '720' bytes might be written: Lines: 432, 438, 439, 441, 442, 445, 447, 448, 450, 451 mp3internals.cpp 451<br>
Warning 25 warning C6386: Buffer overrun: accessing '<a href="http://si.ch">si.ch</a>', the writable size is '480' bytes, but '720' bytes might be written: Lines: 349, 355, 356, 358, 359, 362, 364, 365 mp3internals.cpp 365<br>
Warning 27 warning C6385: Invalid data: accessing '<a href="http://si.ch">si.ch</a>', the readable size is '480' bytes, but '720' bytes might be read: Lines: 432, 438, 439, 441, 442, 445, 447, 448 mp3internals.cpp 448<br>
Warning 26 warning C6385: Invalid data: accessing '<a href="http://si.ch">si.ch</a>', the readable size is '480' bytes, but '720' bytes might be read: Lines: 349, 355, 356, 358, 359, 362, 364, 365, 366, 364, 365, 366, 364, 365, 366, 364, 369, 370, 371 mp3internals.cpp 371<br>
Warning 24 warning C6385: Invalid data: accessing 'live_tabsel[isMPEG2]', the readable size is '192' bytes, but '384' bytes might be read: Lines: 157, 158, 159, 166, 167, 168, 170, 173, 176, 178, 179, 180, 181, 182, 183, 184, 186, 188, 194 mp3internals.cpp 194<br>
Warning 23 warning C6244: Local declaration of 'slen' hides previous declaration at line '434' of 'mp3internalshuffman.cpp' mp3internalshuffman.cpp 505<br>Warning 22 warning C6054: String 'command' might not be zero-terminated: Lines: 341, 342, 343, 344, 345, 346, 350, 351, 353, 355 mp3internalshuffman.cpp 355<br>
Warning 19 warning C6031: Return value ignored: 'sscanf' mp3internalshuffman.cpp 353<br>Warning 20 warning C6031: Return value ignored: 'sscanf' mp3internalshuffman.cpp 365<br>Warning 21 warning C6031: Return value ignored: 'sscanf' mp3internalshuffman.cpp 376<br>
Warning 18 warning C6385: Invalid data: accessing 'hbuf', the readable size is '3' bytes, but '4' bytes might be read: Lines: 226, 227, 228, 230, 231, 233, 241, 242, 243, 252, 259, 268, 288, 289, 290, 293, 294 mp3streamstate.cpp 294<br>
Warning 16 warning C6385: Invalid data: accessing 'argument 2', the readable size is '2500' bytes, but '1048556' bytes might be read: Lines: 153, 155, 166, 167, 168, 169, 170, 171, 173 mp3streamstate.cpp 173<br>
Warning 17 warning C6053: Call to '_snprintf' might not zero-terminate string 'writeBuf': Lines: 201, 203, 204, 205, 206, 212, 215 mp3streamstate.cpp 215<br>Warning 13 warning C4996: 'fileno': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _fileno. See online help for details. MP3StreamState.cpp 417<br>
<br>Thanks,<br><br>Jeremy<br></div></div>