diff --git a/libcelt/celt.c b/libcelt/celt.c index 0395568034d30bfc4844c37a047ffc5d8c747afb..6c0aafd72b303cab06353bf54c923e499b60c528 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 0181e11d18641566e3abf2698d1e3c99acb9b9ab..4ac04109e3e59caa056ee3d6a155f3aec79eb8d9 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 - ; -}