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

5 Commits

Author SHA1 Message Date
5af13f7d79 bump version 2013-01-19 18:14:00 +09:00
5c534696a9 fix crash on wrong long option, rename --ignore-length to --ignorelength 2013-01-19 18:12:49 +09:00
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 25 additions and 3 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

@ -108,7 +108,7 @@ PROGNAME " %s\n"
" transport layer\n"
"\n"
" -o <filename> Output filename\n"
" --ignore-length Ignore length of WAV header\n"
" --ignorelength Ignore length of WAV header\n"
"\n"
"Options for raw (headerless) input:\n"
" -R, --raw Treat input as raw (by default WAV is\n"
@ -212,7 +212,7 @@ int parse_options(int argc, char **argv, aacenc_param_ex_t *params)
{ "adts-crc-check", no_argument, 0, 'C' },
{ "header-period", required_argument, 0, 'P' },
{ "ignore-length", no_argument, 0, 'I' },
{ "ignorelength", no_argument, 0, 'I' },
{ "raw", no_argument, 0, 'R' },
{ "raw-channels", required_argument, 0, OPT_RAW_CHANNELS },
@ -233,6 +233,7 @@ int parse_options(int argc, char **argv, aacenc_param_ex_t *params)
{ "tempo", required_argument, 0, M4AF_TAG_TEMPO },
{ "tag", required_argument, 0, OPT_SHORT_TAG },
{ "long-tag", required_argument, 0, OPT_LONG_TAG },
{ 0, 0, 0, 0 },
};
params->afterburner = 1;
@ -357,6 +358,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.3";
#endif