<DIV>Hi, All</DIV>
<DIV> 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. </DIV>
<DIV> </DIV>
<DIV> The cause is located in MediaSubsession::getNormalPlayTime() , MediaSession.cpp. Look at this line:</DIV>
<DIV> u_int32_t timestampOffset = rtpSource()->curPacketRTPTimestamp() - rtpInfo.timestamp;</DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV> A solution to this problem can be just add a judgement before compute the new fNPT_PTS_Offset:</DIV>
<DIV> ..........................</DIV>
<DIV> if (rtpInfo.infoIsNew) {</DIV>
<DIV> if(rtpSource()->curPacketRTPSeqNum() < rtpInfo.seqNum) return -0.1; // add this line<BR> u_int32_t timestampOffset = rtpSource()->curPacketRTPTimestamp() - rtpInfo.timestamp; <BR> double nptOffset = (timestampOffset/(double)(rtpSource()->timestampFrequency()))*scale();<BR> ..........................<BR></DIV>
<DIV> Then the VLC media will work fine.</DIV>
<DIV> </DIV>
<DIV> John. ShaoFa</DIV>
<DIV> 2010-9-9</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>