shithub: libopusenc

Download patch

ref: 3e3296d3231e93a864782f5314f405dc332cdac0
parent: b37719f1c50f190e02545906d75f68ff0f7f731b
author: Jean-Marc Valin <[email protected]>
date: Thu Dec 28 11:49:19 EST 2017

fix comments

--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -86,7 +86,7 @@
   c = malloc(sizeof(*c));
   if (c == NULL) return NULL;
   libopus_str = opus_get_version_string();
-  snprintf(vendor_str, sizeof(vendor_str), "%s, %s version %s", libopus_str, PACKAGE_NAME, PACKAGE_VERSION);
+  snprintf(vendor_str, sizeof(vendor_str), "%s, %s %s", libopus_str, PACKAGE_NAME, PACKAGE_VERSION);
   comment_init(&c->comment, &c->comment_length, vendor_str);
   if (c->comment == NULL) {
     free(c);
@@ -129,7 +129,7 @@
 /* Add a comment. */
 int ope_comments_add_string(OggOpusComments *comments, const char *tag_and_val) {
   if (!strchr(tag_and_val, '=')) return OPE_BAD_ARG;
-  if (comment_add(&comments->comment, &comments->comment_length, tag_and_val, NULL)) return OPE_ALLOC_FAIL;
+  if (comment_add(&comments->comment, &comments->comment_length, NULL, tag_and_val)) return OPE_ALLOC_FAIL;
   return OPE_OK;
 }