if (!bHasMediaPacket) {
packet.FreePacket();
}
+ if (m_bPausing == 3) {
+ if (packet.m_nTimeStamp <= m_pauseStamp) {
+ bHasMediaPacket = false;
+ continue;
+ }
+ m_bPausing = 0;
+ }
}
if (bHasMediaPacket)
case 0:
tmp = ReadInt32(packet.m_body + 2);
Log(LOGDEBUG, "%s, Stream Begin %d", __FUNCTION__, tmp);
- m_bPausing = 0;
break;
case 1:
tmp = ReadInt32(packet.m_body + 2);
Log(LOGDEBUG, "%s, Stream BufferEmpty %d", __FUNCTION__, tmp);
if (!m_bPausing) {
- SendPause(true, m_channelTimestamp[m_mediaChannel]);
+ m_pauseStamp = m_channelTimestamp[m_mediaChannel];
+ SendPause(true, m_pauseStamp);
m_bPausing = 1;
} else if (m_bPausing == 2) {
- SendPause(false, m_channelTimestamp[m_mediaChannel]);
+ SendPause(false, m_pauseStamp);
m_bPausing = 3;
}
break;