shithub: libopusenc

Download patch

ref: 7fd2315d11e8922ea86cb29db87248a309ae2515
parent: 56567fae64db5d2dd9745979fd8acb66de54e2ba
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Fri Dec 29 06:53:29 EST 2017

Remove comment_replace_vendor_string() which is now useless

--- a/src/opus_header.c
+++ b/src/opus_header.c
@@ -241,24 +241,6 @@
   }
 }
 
-int _ope_comment_replace_vendor_string(char **comments, int* length, const char *vendor_string)
-{
-  char* p=*comments;
-  int vendor_length;
-  int newlen;
-  int newvendor_length;
-  vendor_length=readint(p, 8);
-  newvendor_length=strlen(vendor_string);
-  newlen=*length+newvendor_length-vendor_length;
-  p=realloc(p, newlen);
-  if (p == NULL) return 1;
-  writeint(p, 8, newvendor_length);
-  memmove(p+12+newvendor_length, p+12+vendor_length, newlen-12-newvendor_length);
-  memcpy(p+12, vendor_string, newvendor_length);
-  *comments=p;
-  *length=newlen;
-  return 0;
-}
 #undef readint
 #undef writeint
 
--- a/src/opus_header.h
+++ b/src/opus_header.h
@@ -52,6 +52,4 @@
 
 void _ope_comment_pad(char **comments, int* length, int amount);
 
-int _ope_comment_replace_vendor_string(char **comments, int* length, const char *vendor_string);
-
 #endif