byte[] buffer = new byte[100];
GCHandle hObject = GCHandle.Alloc(buffer, GCHandleType.Pinned);
IntPtr ptr = hObject.AddrOfPinnedObject();
byte[] arrBuf = new byte[1];
Marshal.Copy(ptr, arrBuf, 0, 1);
mediaFileReader.GetVideFrameBuffer(sFileName, frameIndex, BufferSize, ref arrBuf[0], out videoWidth, out videoHeight,
out pulRowPitch);