public void Close()
    {
        Pause();

        IsVisual        = false;
        Width           = Height = 0;
        PixelFormat     = AVProQuickTimePlugin.PixelFormat.Unknown;
        IsPrepared      = false;
        IsPaused        = true;
        IsPlaying       = false;
        PlayState       = PlaybackState.Unknown;
        _lastFrameDrawn = 0xffffffff;

        if (_formatConverter != null)
        {
            _formatConverter.Reset();
        }

        if (_movieMemoryHandle.IsAllocated)
        {
            _movieMemoryHandle.Free();
        }
        _movieMemoryPtr    = IntPtr.Zero;
        _movieMemoryLength = 0;

        if (_movieHandle >= 0)
        {
            AVProQuickTimePlugin.FreeInstanceHandle(_movieHandle);
            _movieHandle = -1;
        }
    }