1
0
mirror of https://github.com/nu774/fdkaac.git synced 2025-06-05 23:29:14 +02:00

3 Commits

Author SHA1 Message Date
33e12bc4f5 bump version 2013-01-17 17:12:06 +09:00
bfb6aa3cb8 compat_win32: free argv with atexit() 2013-01-17 17:11:19 +09:00
360cf7dc8b take care of COPYRIGHT-SIGN in UTF-8 2013-01-17 17:10:21 +09:00
3 changed files with 22 additions and 1 deletions

View File

@ -75,6 +75,17 @@ FILE *aacenc_fopen(const char *name, const char *mode)
return fp;
}
static char **__aacenc_argv__;
static
void aacenc_free_mainargs(void)
{
char **p = __aacenc_argv__;
for (; *p; ++p)
free(*p);
free(__aacenc_argv__);
}
void aacenc_getmainargs(int *argc, char ***argv)
{
int i;
@ -86,6 +97,8 @@ void aacenc_getmainargs(int *argc, char ***argv)
for (i = 0; i < *argc; ++i)
codepage_encode_wchar(CP_UTF8, wargv[i], &(*argv)[i]);
(*argv)[*argc] = 0;
__aacenc_argv__ = *argv;
atexit(aacenc_free_mainargs);
}
char *aacenc_to_utf8(const char *s)

View 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) {

View File

@ -1,4 +1,4 @@
#ifndef VERSION_H
#define VERSION_H
const char *fdkaac_version = "0.1.1";
const char *fdkaac_version = "0.1.2";
#endif