[Live-devel] Proxying SIP live RTP to RTSP problem (segfault)

Ross Finlayson finlayson at live555.com
Sun Sep 24 23:29:53 PDT 2017


> While the H264LiveServerMediaSession constructor is called once - the
> createNewRTPSink/createNewStreamSource are called twice (?!) upon RTSP
> connection. May be this is the real reason of "FramedSource[0x1bf42e0]::getNextFrame():
> attempting to read more" message ?

No, I don’t think so, because between the two calls to “createNewStreamSource()”, there should be a call to “~H264VideoStreamDiscreteFramer()” (i.e., to close the object that was created by the first "createNewStreamSource()”.  This is the case because you set the “reuseFirstSource” parameter to True in your call to the “OnDemandServerMediaSubsession” constructor.


>> 
>> If you know the SPS and PPS NAL units ahead of time, then you can add
>> them as (otherwise optional) parameters to the call to
>> ?H264VideoRTPSink::createNew()? in ?playCommon.cpp?.
> 
> Sorry, I'm new to the live555 - can you show me the _exact_ way how to
> extract SPS/PPS in playSIP app from SIP H264 RTP packet stream using
> live555 API ?

Are you *sure* that there was no "sprop-parameter-sets=“ assignment in a "a=fmtp:” line in the SDP description returned by SIP?  If there was, then it should end up in the “MediaSubsession” object.

But otherwise, your RTSP server is not going to work properly (or, more accurately, it will work, but clients won’t be able to play the stream because they won’t know the SPS and PPS NAL units before they start playing the stream).  Is it the case that the SPS and PPS NAL units don’t appear in the SIP SDP, but instead appear inline (e.g., periodically) in the H.264 stream?  If that’s the case, then you’ll have to implement the “getAuxSDPLine()” virtual function in your “H264LiveServerMediaSession” class.  For guidance on how to do this, see how we implement the “H264VideoFileServerMediaSubsession” class.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list