shithub: libopusenc

Download patch

ref: 08c71874219a1085ac6b45ee95aec9f68a2f0ae7
parent: dca720f0b04330ba7eae25c7d6ead73f563a08db
author: Jean-Marc Valin <[email protected]>
date: Fri Dec 29 06:47:49 EST 2017

cleanup

--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -206,12 +206,12 @@
   if (!enc->pull_api) output_pages(enc);
 }
 
-int stdio_write(void *user_data, const unsigned char *ptr, opus_int32 len) {
+static int stdio_write(void *user_data, const unsigned char *ptr, opus_int32 len) {
   struct StdioObject *obj = (struct StdioObject*)user_data;
   return fwrite(ptr, 1, len, obj->file) != (size_t)len;
 }
 
-int stdio_close(void *user_data) {
+static int stdio_close(void *user_data) {
   struct StdioObject *obj = (struct StdioObject*)user_data;
   int ret = 0;
   if (obj->file) ret = fclose(obj->file);
@@ -359,7 +359,7 @@
 }
 
 /* Create a new OggOpus stream, pulling one page at a time. */
-OPE_EXPORT OggOpusEnc *ope_encoder_create_pull(OggOpusComments *comments, opus_int32 rate, int channels, int family, int *error) {
+OggOpusEnc *ope_encoder_create_pull(OggOpusComments *comments, opus_int32 rate, int channels, int family, int *error) {
   OggOpusEnc *enc = ope_encoder_create_callbacks(NULL, NULL, comments, rate, channels, family, error);
   if (enc) enc->pull_api = 1;
   return enc;
@@ -617,7 +617,7 @@
 }
 
 /* Get the next page from the stream. Returns 1 if there is a page available, 0 if not. */
-OPE_EXPORT int ope_encoder_get_page(OggOpusEnc *enc, unsigned char **page, opus_int32 *len, int flush) {
+int ope_encoder_get_page(OggOpusEnc *enc, unsigned char **page, opus_int32 *len, int flush) {
   if (enc->unrecoverable) return OPE_UNRECOVERABLE;
   if (!enc->pull_api) return 0;
   else {