private void _killDecoder()
        {
            bool resFreeDec = false;
            bool resFreeCfg = false;
            bool resFreeTxf = false;

            MixCastAV.ReleaseDecodeInterface(decoderInterface);
            System.Threading.Thread.Sleep(2);             //untested amount of sleep time in ms needed to avoid race condition


            //free the decoder
            if (vidDec != IntPtr.Zero)
            {
                resFreeDec = MixCastAV.freeDecodeContext(vidDec) == 0 ? true : false;
            }
            vidDec = IntPtr.Zero;

            //free the data config
            if (cfgVidDec != IntPtr.Zero)
            {
                resFreeCfg = MixCastAV.freeVideoCfg(cfgVidDec) == 0 ? true : false;
            }
            cfgVidDec = IntPtr.Zero;

            //free the transformer
            if (vidTxfDec != IntPtr.Zero)
            {
                resFreeTxf = MixCastAV.freeVideoTransform(vidTxfDec) == 0 ? true : false;
            }
            vidTxfDec = IntPtr.Zero;


            if (resFreeDec == false || resFreeCfg == false || resFreeTxf == false)
            {
                Debug.LogError("Error Freeing Device Feed. " + vidDec);
            }
        }