code: func (self *QueueCursor) ReadPacket() (pkt av.Packet, err error) {
  	self.que.cond.L.Lock()
  	buf := self.que.buf
  	if !self.gotpos {
  		self.pos = self.init(buf, self.que.videoidx)
  		self.gotpos = true
  	}
  	for {
  		if self.pos.LT(buf.Head) {
  			self.pos = buf.Head
  		} else if self.pos.GT(buf.Tail) {
  			self.pos = buf.Tail
  		}
  		if buf.IsValidPos(self.pos) {
  			pkt = buf.Get(self.pos)
  			self.pos++
  			break
  		}
  		if self.que.closed {
  			err = io.EOF
  			break
  		}
  		self.que.cond.Wait()
  	}
  	self.que.cond.L.Unlock()
  	return
  }
docs: // ReadPacket will not consume packets in Queue, it's just a cursor.