opus: Make opus_common.[ch] independent of ogg.h.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 14 Mar 2016 08:00:28 +0000 (09:00 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 28 Mar 2016 17:24:01 +0000 (17:24 +0000)
The only reason opus_common.c includes ogg.h is that struct opus_header
contains a variable of type ogg_uint32_t. By using plain uint32_t
instead we may get rid of the include.

opus_common.c
opus_common.h

index 374df8375acffda9fa637999f4ecad7f2321535b..f4e18df915d657e43e9f9e583313ef962471a62a 100644 (file)
@@ -29,8 +29,6 @@
  * handler.
  */
 
-#include <ogg/ogg.h>
-
 #include "para.h"
 #include "error.h"
 #include "opus_common.h"
@@ -53,7 +51,7 @@ static int read_chars(struct packet *p, unsigned char *str, int nb_chars)
        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;
index bdc67edd47cc2c446b5bd45a5572a4b81393b5a2..2160f15192f30a8f1b5fde0be38fcd127a89681a 100644 (file)
@@ -18,7 +18,7 @@ struct opus_header {
        /** Number of bytes to skip from the beginning. */
        uint16_t preskip;
        /** Sample rate of the input stream, used by the audio format handler. */
-       ogg_uint32_t input_sample_rate;
+       uint32_t input_sample_rate;
        /** In dB, should be zero whenever possible. */
        uint16_t gain;
        /** Number of logical streams (usually 1). */