InputStreamSourceFilter.H264.H264CodecData.IntFromBigEndian C# (CSharp) Method

IntFromBigEndian() static private method

static private IntFromBigEndian ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int
    static int IntFromBigEndian(byte[] buffer, int offset, int count)
    {
      if (count > 4)
        count = 4;
      int result = 0;
      for (int x = 0; x < count; x++)
      {
        int shift = 8 * (count - 1 - x);
        result = result | buffer[x + offset] << shift;
      }
      return result;
    }
  }