shithub: opus

Download patch

ref: b0f4e90bff5f902ddbad28d7934f58baf7f135ff
parent: 45b27da44c042e93ca154439ef5fc3b30d05ddaa
author: Ralph Giles <[email protected]>
date: Wed Sep 7 09:16:29 EDT 2011

Move the fallback OPUS_VERSION to libcelt.

In f9265ddf25cc opus_get_version_string() was moved
to libcelt, but the fallback definition for OPUS_VERSION
stayed in src/opus.c. This is helpful for those using
and external build system, which may not duplicate
all the defines from the included build files.

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -50,6 +50,10 @@
 #include "plc.h"
 #include "vq.h"
 
+#ifndef OPUS_VERSION
+#define OPUS_VERSION "unknown"
+#endif
+
 static const unsigned char trim_icdf[11] = {126, 124, 119, 109, 87, 41, 19, 9, 4, 2, 0};
 /* Probs: NONE: 21.875%, LIGHT: 6.25%, NORMAL: 65.625%, AGGRESSIVE: 6.25% */
 static const unsigned char spread_icdf[4] = {25, 23, 2, 0};
--- a/src/opus.c
+++ b/src/opus.c
@@ -32,10 +32,6 @@
 #include "opus.h"
 #include "opus_private.h"
 
-#ifndef OPUS_VERSION
-#define OPUS_VERSION "unknown"
-#endif
-
 int encode_size(int size, unsigned char *data)
 {
    if (size < 252)