anchor.diff:  					(make-array (suggested-buffer-size rec) :element-type '(unsigned-byte 8)))))
     (setf (cdr (last (chunk-queue rec))) (chunk-queue rec)
   	(rcursor rec) (chunk-queue rec)
  -	(wcursor rec) (chunk-queue rec)))
  +	(wcursor rec) (cdr (chunk-queue rec))))
   
   (defclass video-stream ()
     ((filename :accessor filename :initarg :filename :initform nil)))
  
positive.code: 	(error 'unrecognized-file-format))
        (cond ((string-equal fourcc "avi ") (read-avi-header avi stream))
  	    (t (error 'unsupported-avi-file-format))))
      (bt:acquire-lock (vacancy-lock (car (wcursor (find-mjpeg-stream-record avi))))) ;the player shouldn't start before 1st frame is decoded
      (when (player-callback avi)
        (funcall (player-callback avi) avi))
      (loop for chunk = (riff:read-riff-chunk stream :chunk-data-reader (chunk-decoder avi))
  	 while chunk)))
  
  (defun decode-file (pathname &key player-callback)
    (let ((avi-stream (make-instance 'avi-mjpeg-stream :filename pathname :player-callback player-callback)))
  
negative.code:       (jpeg:decode-stream is :buffer (frame chunk)
  			  :descriptor (jpeg-descriptor rec)))
      (bt:release-lock cur-lock)))
  
  (defmethod initialize-instance :after ((s avi-mjpeg-stream) &key &allow-other-keys)
    (setf (chunk-decoder s) #'(lambda (stream id size)
  