* handler.
*/
-#include <ogg/ogg.h>
-
#include "para.h"
#include "error.h"
#include "opus_common.h"
return 1;
}
-static int read_uint32(struct packet *p, ogg_uint32_t *val)
+static int read_uint32(struct packet *p, uint32_t *val)
{
if (p->pos > p->maxlen - 4)
return 0;
return 1;
}
-static int read_uint16(struct packet *p, ogg_uint16_t *val)
+static int read_uint16(struct packet *p, uint16_t *val)
{
if (p->pos > p->maxlen - 2)
return 0;
char str[9];
struct packet p;
unsigned char ch, channel_mapping;
- ogg_uint16_t shortval;
p.data = packet;
p.maxlen = len;
if (h->channels == 0)
return -E_OPUS_HEADER;
- if (!read_uint16(&p, &shortval))
+ if (!read_uint16(&p, &h->preskip))
return -E_OPUS_HEADER;
- h->preskip = shortval;
if (!read_uint32(&p, &h->input_sample_rate))
return -E_OPUS_HEADER;
- if (!read_uint16(&p, &shortval))
+ if (!read_uint16(&p, &h->gain))
return -E_OPUS_HEADER;
- h->gain = (short)shortval;
if (!read_chars(&p, &ch, 1))
return -E_OPUS_HEADER;