]> iEval git - fdkaac.git/blobdiff - src/main.c
take care of COPYRIGHT-SIGN in UTF-8
[fdkaac.git] / src / main.c
index 458fe254da3877ecfa0e0c6553a194401187ee27..4db5fb2e8c469b0783ee939092d092048468080a 100644 (file)
@@ -357,6 +357,14 @@ int parse_options(int argc, char **argv, aacenc_param_ex_t *params)
                 }
                 *val++ = '\0';
                 if (ch == OPT_SHORT_TAG) {
+                    /*
+                     * take care of U+00A9(COPYRIGHT SIGN).
+                     * 1) if length of fcc is 3, we prepend '\xa9'.
+                     * 2) U+00A9 becomes "\xc2\xa9" in UTF-8. Therefore
+                     *    we remove first '\xc2'.
+                     */
+                    if (optarg[0] == '\xc2')
+                        ++optarg;
                     if ((klen = strlen(optarg))== 3)
                         fcc = 0xa9;
                     else if (klen != 4) {
@@ -470,7 +478,7 @@ END:
 }
 
 static
-int put_tag_entry(m4af_writer_t *m4af, const aacenc_tag_entry_t *tag)
+void put_tag_entry(m4af_writer_t *m4af, const aacenc_tag_entry_t *tag)
 {
     unsigned m, n = 0;
 
@@ -567,6 +575,7 @@ int put_tag_entry(m4af_writer_t *m4af, const aacenc_tag_entry_t *tag)
     case M4AF_FOURCC('t','v','e','n'):
     case M4AF_FOURCC('t','v','n','n'):
     case M4AF_FOURCC('t','v','s','h'):
+    case M4AF_FOURCC('x','i','d',' '):
     case M4AF_FOURCC('\xa9','e','n','c'):
     case M4AF_FOURCC('\xa9','s','t','3'):
         {
This page took 0.019792 seconds and 4 git commands to generate.