winlin

fix #134, not fix for the shrink to clear the queue.

@@ -246,6 +246,8 @@ void SrsMessageQueue::shrink() @@ -246,6 +246,8 @@ void SrsMessageQueue::shrink()
246 246
247 // no iframe, for audio, clear the queue. 247 // no iframe, for audio, clear the queue.
248 // it is ok to clear for audio, for the shrink tell us the queue is full. 248 // it is ok to clear for audio, for the shrink tell us the queue is full.
  249 + // for video, we clear util the I-Frame, for the decoding must start from I-frame,
  250 + // for audio, it's ok to clear any data, also we can clear the whole queue.
249 // @see: https://github.com/winlinvip/simple-rtmp-server/issues/134 251 // @see: https://github.com/winlinvip/simple-rtmp-server/issues/134
250 if (iframe_index < 0) { 252 if (iframe_index < 0) {
251 clear(); 253 clear();