[Live-devel] [vlc-devel] A Bug: VLC CANNOT seek RTSP stream , and its solution

Sébastien Escudier sebastien-devel at celeos.eu
Thu Sep 9 02:59:47 PDT 2010


Hi,
Thanks for the report.
You point out some modification in live555 so I copy this email to
live555 mailing list.

Best regards.


On Thu, 2010-09-09 at 17:38 +0800, sf wrote:
> Hi, All
>         I think I have found a bug with live555 library which is used
> in VLC media player. When it' playing  a RTSP stream from the
> MediaServer,  I drag the slider to a new position but an error
> occurs : The slider will no longer move, while the video and audio
> still run correctly. (the tsx file is right there, and sequential
> playing is no problem). So I say, the live555 library with the client
> is not able to 'SEEK' to a position. 
>  
>        The cause is located in the live555 library. See
> MediaSession.cpp,  MediaSubsession::getNormalPlayTime() .   Look at
> this line:
>               u_int32_t timestampOffset =
> rtpSource()->curPacketRTPTimestamp() - rtpInfo.timestamp;
> In the suitation of 'SEEKING', it will not work because
> rtpInfo.timestamp will be larger than curPacketRTPTimestamp. According
> to RFC 2326, the media server echo a reply in response of 'PLAY' with
> the timestamp and seq_num. And should it be noted that the seq_num can
> be something in the future. So current RTP packet's timestamp maybe
> smaller than the rtpInfo.timestamp.
>  
>        A solution to this problem can be just add a judgement before
> compute the new fNPT_PTS_Offset:
>      ..........................
>     if (rtpInfo.infoIsNew) {
>       if(rtpSource()->curPacketRTPSeqNum() < rtpInfo.seqNum) return
> -0.1; // add this line
>       u_int32_t timestampOffset = rtpSource()->curPacketRTPTimestamp()
> - rtpInfo.timestamp;      
>       double nptOffset =
> (timestampOffset/(double)(rtpSource()->timestampFrequency()))*scale();
>       ..........................
> 
>         Then the VLC media player will work fine.
>  
>         John. ShaoFa
>         2010-9-9
>  
>  
>  
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel



More information about the live-devel mailing list