[Live-devel] [Live-develop] Problems with delete in MediaSink.cpp

Cristiano Belloni belloni at imavis.com
Mon Feb 18 09:02:33 PST 2008


Ross Finlayson wrote:
> Cristiano,
>
> What you're doing looks OK.  Perhaps the first thing you could look 
> into is to check whether your RTPSink (subclass)'s destructor is 
> somehow getting called more than once (for each instance of the 
> class).  Obviously this shouldn't be happening, but it would explain 
> the symptoms that you're seeing.
>   
I did a little debug, and discovered my OnDemandServerMediaSubsession 
subclass gets created twice when a stream is requested. It consequently 
creates two H263plusVideoRTPSink  instances. May this be the the problem?

Here it is a snippet of my debug results:

Play this stream using the URL "rtsp://192.168.1.77/video"
(stream request by VLC)
Started a new EncH263plusVideoFileServerMediaSubsession
Done
Creating new sink
Started a new EncH263plusVideoFileServerMediaSubsession
Done
Creating new sink
(creates two EncH263plusVideoFileServerMediaSubsession and two sinks)
H263FramedSource: Calling deliverFrame()
(starts delivering frames)
Frame 0 long 5302

I create the media session etc like that in the main():

ServerMediaSession* sms
      = ServerMediaSession::createNew(*env, streamName, streamName,
                      descriptionString);
   
    EncH263plusVideoFileServerMediaSubsession* mss = 
EncH263plusVideoFileServerMediaSubsession::createNew(*env, inputSink, 
reuseFirstSource);
  
    sms->addSubsession(mss);
    rtspServer->addServerMediaSession(sms);
    announceStream(rtspServer, sms, streamName, inputSink);

Am I doing something wrong?

Regards,

Cristiano.

-- 
Belloni Cristiano
Imavis Srl.
www.imavis.com <http://www.imavis.com>
belloni at imavis.com <mailto://belloni@imavis.com>


More information about the live-devel mailing list