-unsigned aac_read_int32(unsigned char *buf)
-{
- uint8_t *d = (uint8_t*)buf;
- return (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3];
-}
-
-
-int aac_find_entry_point(unsigned char *buf, unsigned buflen, int *skip)
+/**
+ * search for the first entry in the stco table
+ *
+ * \param buf buffer to seach
+ * \param buflen length of \a buf
+ * \param skip Upon succesful return, this contains the number
+ * of bytes to skip from the input buffer.
+ *
+ * \return the position of the first entry in the table on success,
+ * -E_STCO on errors.
+ */
+ssize_t aac_find_entry_point(unsigned char *buf, size_t buflen, size_t *skip)