From f9265ddf25cc512788820a636df11dc002210639 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin <jmvalin@jmvalin.ca> Date: Thu, 1 Sep 2011 13:46:18 -0400 Subject: [PATCH] opus_strerror() and opus_get_version_string() moved to libcelt --- libcelt/celt.c | 28 ++++++++++++++++++++++++++++ src/opus.c | 26 -------------------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/libcelt/celt.c b/libcelt/celt.c index 039556803..6c0aafd72 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -2751,3 +2751,31 @@ bad_request: return OPUS_UNIMPLEMENTED; } + + +const char *opus_strerror(int error) +{ + static const char *error_strings[8] = { + "success", + "invalid argument", + "buffer too small", + "internal error", + "corrupted stream", + "request not implemented", + "invalid state", + "memory allocation failed" + }; + if (error > 0 || error < -7) + return "unknown error"; + else + return error_strings[-error]; +} + +const char *opus_get_version_string(void) +{ + return "libopus " OPUS_VERSION +#ifdef FUZZING + "-fuzzing" +#endif + ; +} diff --git a/src/opus.c b/src/opus.c index 0181e11d1..4ac04109e 100644 --- a/src/opus.c +++ b/src/opus.c @@ -49,29 +49,3 @@ int encode_size(int size, unsigned char *data) } } -const char *opus_strerror(int error) -{ - static const char *error_strings[8] = { - "success", - "invalid argument", - "buffer too small", - "internal error", - "corrupted stream", - "request not implemented", - "invalid state", - "memory allocation failed" - }; - if (error > 0 || error < -7) - return "unknown error"; - else - return error_strings[-error]; -} - -const char *opus_get_version_string(void) -{ - return "libopus " OPUS_VERSION -#ifdef FUZZING - "-fuzzing" -#endif - ; -} -- GitLab