[Live-devel] StreamParser/ensureValidBytes1: fail to parse h264 file source
Hyung Jin Jung
realbright at lgcns.com
Fri Sep 9 01:16:19 PDT 2016
When I run live555MediaServer.exe, program send "throw" in the middle of making SDP lines.
As you can see below backtrace it happened in void StreamParser::ensureValidBytes1
The problem is StreamParser::afterGettingBytes never called back in synchronous mode.
Because of ByteStreamFileSource::doReadFromFile just schedule it rather than call FramedSource::afterGetting directly
I don't know how live555 scheduler worked, exactly but this logic seem to wired..
Anyone show me the way how to handle this?
BR,
Davy
Breakpoint 2, StreamParser::ensureValidBytes1 (this=this at entry=0x8b6fa0, numBytesNeeded=numBytesNeeded at entry=4) at StreamParser.cpp:161
161 throw NO_MORE_BUFFERED_INPUT;
(gdb) bt
#0 StreamParser::ensureValidBytes1 (this=this at entry=0x8b6fa0, numBytesNeeded=numBytesNeeded at entry=4) at StreamParser.cpp:161
#1 0x000000000040adcd in ensureValidBytes (numBytesNeeded=4, this=0x8b6fa0) at StreamParser.hh:118
#2 test4Bytes (this=0x8b6fa0) at StreamParser.hh:54
#3 H264or5VideoStreamParser::parse (this=0x8b6fa0) at H264or5VideoStreamFramer.cpp:951
#4 0x0000000000405b5d in MPEGVideoStreamFramer::continueReadProcessing (this=0x8b6da0) at MPEGVideoStreamFramer.cpp:159
#5 0x0000000000405bf8 in MPEGVideoStreamFramer::doGetNextFrame (this=0x8b6da0) at MPEGVideoStreamFramer.cpp:142
#6 0x0000000000402832 in FramedSource::getNextFrame (this=0x8b6da0,
to=to at entry=0x204d421 "\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\27
2\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\25
5\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\36
0\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\
r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r"...,
maxSize=100000,
afterGettingFunc=afterGettingFunc at entry=0x419a06 <H264or5Fragmenter::afterGettingFrame(void*, unsigned int, unsigned int, timeval, unsigned int)>,
afterGettingClientData=afterGettingClientData at entry=0x204d2b0, onCloseFunc=0x402896 <FramedSource::handleClosure(void*)>,
onCloseClientData=onCloseClientData at entry=0x204d2b0) at FramedSource.cpp:78
#7 0x000000000041956d in H264or5Fragmenter::doGetNextFrame (this=0x204d2b0) at H264or5VideoRTPSink.cpp:181
#8 0x0000000000402832 in FramedSource::getNextFrame (this=0x204d2b0,
to=0x203493c "\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360
\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r
\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\2
72\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\2
55\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272\r\360\255\272"..., maxSize=100452,
afterGettingFunc=0x423b76 <MultiFramedRTPSink::afterGettingFrame(void*, unsigned int, unsigned int, timeval, unsigned int)>,
afterGettingClientData=0x2034560, onCloseFunc=0x423b8e <MultiFramedRTPSink::ourHandleClosure(void*)>, onCloseClientData=0x2034560)
at FramedSource.cpp:78
#9 0x0000000000423a7d in MultiFramedRTPSink::packFrame (this=0x2034560) at MultiFramedRTPSink.cpp:224
#10 0x0000000000423b42 in MultiFramedRTPSink::buildAndSendPacket (this=this at entry=0x2034560, isFirstPacket=isFirstPacket at entry=1 '\001')
at MultiFramedRTPSink.cpp:199
#11 0x0000000000423b58 in MultiFramedRTPSink::continuePlaying (this=this at entry=0x2034560) at MultiFramedRTPSink.cpp:159
#12 0x0000000000419ad7 in H264or5VideoRTPSink::continuePlaying (this=0x2034560) at H264or5VideoRTPSink.cpp:127
#13 0x00000000004167fb in MediaSink::startPlaying (this=0x2034560, source=..., afterFunc=afterFunc at entry=0x43b1d9 <afterPlayingDummy(void*)>,
afterClientData=afterClientData at entry=0x1fea290) at MediaSink.cpp:78
#14 0x000000000043b2c7 in H264VideoFileServerMediaSubsession::getAuxSDPLine (this=0x1fea290, rtpSink=<optimized out>, inputSource=<optimized out>)
at H264VideoFileServerMediaSubsession.cpp:92
#15 0x000000000043aaa6 in OnDemandServerMediaSubsession::setSDPLinesFromRTPSink (this=this at entry=0x1fea290, rtpSink=rtpSink at entry=0x2034560,
inputSource=inputSource at entry=0x8b6da0, estBitrate=500) at OnDemandServerMediaSubsession.cpp:433
#16 0x000000000043acbd in OnDemandServerMediaSubsession::sdpLines (this=0x1fea290) at OnDemandServerMediaSubsession.cpp:76
#17 0x0000000000439244 in ServerMediaSession::generateSDPDescription (this=this at entry=0x1fea010) at ServerMediaSession.cpp:240
#18 0x000000000042a02f in RTSPServer::RTSPClientConnection::handleCmd_DESCRIBE (this=0x1fe0080, urlPreSuffix=<optimized out>,
urlSuffix=0x22f0e0 "slamtv60.264",
fullRequestStr=0x1fe00a4 "DESCRIBE rtsp://192.168.18.1:8554/slamtv60.264 RTSP/1.0\r\nCSeq: 3\r\nUser-Agent: LibVLC/2.2.4 (LIVE555 Streaming Media
v2016.02.22)\r\nAccept: application/sdp\r\n\r\n") at RTSPServer.cpp:454
#19 0x0000000000428c0a in RTSPServer::RTSPClientConnection::handleRequestBytes (this=0x1fe0080, newBytesRead=<optimized out>) at RTSPServer.cpp:923
---Type <return> to continue, or q <return> to quit---
#20 0x0000000000427074 in GenericMediaServer::ClientConnection::incomingRequestHandler (this=0x1fe0080) at GenericMediaServer.cpp:246
#21 0x0000000000427085 in GenericMediaServer::ClientConnection::incomingRequestHandler (instance=0x8b4a80) at GenericMediaServer.cpp:239
#22 0x000000000045b2c8 in BasicTaskScheduler::SingleStep(unsigned int) ()
#23 0x000000000000007d in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
More information about the live-devel
mailing list