mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
change default extension for ogg flac from .ogg to .oga (SF#1762492: http://sourceforge.net/tracker/index.php?func=detail&aid=1762492&group_id=13478&atid=113478)
This commit is contained in:
@@ -1330,12 +1330,12 @@ void show_explain(void)
|
||||
printf(" --ogg When encoding, generate Ogg FLAC output instead\n");
|
||||
printf(" of native FLAC. Ogg FLAC streams are FLAC\n");
|
||||
printf(" streams wrapped in an Ogg transport layer. The\n");
|
||||
printf(" resulting file should have an '.ogg' extension\n");
|
||||
printf(" resulting file should have an '.oga' extension\n");
|
||||
printf(" and will still be decodable by flac. When\n");
|
||||
printf(" decoding, force the input to be treated as\n");
|
||||
printf(" Ogg FLAC. This is useful when piping input\n");
|
||||
printf(" from stdin or when the filename does not end in\n");
|
||||
printf(" '.ogg'.\n");
|
||||
printf(" '.oga' or '.ogg'.\n");
|
||||
printf(" --serial-number Serial number to use for the FLAC stream. When\n");
|
||||
printf(" encoding and no serial number is given, flac\n");
|
||||
printf(" uses a random one. If encoding to multiple files\n");
|
||||
@@ -1625,6 +1625,8 @@ int encode_file(const char *infilename, FLAC__bool is_first_file, FLAC__bool is_
|
||||
fmt= AIF;
|
||||
else if(strlen(infilename) >= 5 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-5), ".flac"))
|
||||
fmt= FLAC;
|
||||
else if(strlen(infilename) >= 4 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-4), ".oga"))
|
||||
fmt= OGGFLAC;
|
||||
else if(strlen(infilename) >= 4 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-4), ".ogg"))
|
||||
fmt= OGGFLAC;
|
||||
|
||||
@@ -1913,6 +1915,8 @@ int decode_file(const char *infilename)
|
||||
|
||||
if(option_values.use_ogg)
|
||||
treat_as_ogg = true;
|
||||
else if(strlen(infilename) >= 4 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-4), ".oga"))
|
||||
treat_as_ogg = true;
|
||||
else if(strlen(infilename) >= 4 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-4), ".ogg"))
|
||||
treat_as_ogg = true;
|
||||
else
|
||||
@@ -1988,7 +1992,7 @@ int decode_file(const char *infilename)
|
||||
|
||||
const char *get_encoded_outfilename(const char *infilename)
|
||||
{
|
||||
const char *suffix = (option_values.use_ogg? ".ogg" : ".flac");
|
||||
const char *suffix = (option_values.use_ogg? ".oga" : ".flac");
|
||||
return get_outfilename(infilename, suffix);
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ FLAC__bool do_major_operation_on_file(const char *filename, const CommandLineOpt
|
||||
die("out of memory allocating chain");
|
||||
|
||||
/*@@@@ lame way of guessing the file type */
|
||||
if(strlen(filename) >= 4 && 0 == strcmp(filename+strlen(filename)-4, ".ogg"))
|
||||
if(strlen(filename) >= 4 && (0 == strcmp(filename+strlen(filename)-4, ".oga") || 0 == strcmp(filename+strlen(filename)-4, ".ogg")))
|
||||
is_ogg = true;
|
||||
|
||||
if(! (is_ogg? FLAC__metadata_chain_read_ogg(chain, filename) : FLAC__metadata_chain_read(chain, filename)) ) {
|
||||
|
||||
@@ -66,7 +66,7 @@ static off_t flacfilesize_;
|
||||
|
||||
static const char *flacfilename(bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static bool die_(const char *msg)
|
||||
|
||||
@@ -49,7 +49,7 @@ static const unsigned num_metadata_ = sizeof(metadata_sequence_) / sizeof(metada
|
||||
|
||||
static const char *flacfilename(bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static bool die_(const char *msg)
|
||||
|
||||
@@ -80,7 +80,7 @@ static unsigned mc_our_block_number_ = 0;
|
||||
|
||||
static const char *flacfilename(bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static bool die_(const char *msg)
|
||||
|
||||
@@ -66,7 +66,7 @@ static off_t flacfilesize_;
|
||||
|
||||
static const char *flacfilename(FLAC__bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static FLAC__bool die_(const char *msg)
|
||||
|
||||
@@ -51,7 +51,7 @@ static const unsigned num_metadata_ = sizeof(metadata_sequence_) / sizeof(metada
|
||||
|
||||
static const char *flacfilename(FLAC__bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static FLAC__bool die_(const char *msg)
|
||||
|
||||
@@ -73,7 +73,7 @@ static unsigned mc_our_block_number_ = 0;
|
||||
|
||||
static const char *flacfilename(FLAC__bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static FLAC__bool die_(const char *msg)
|
||||
|
||||
@@ -480,7 +480,7 @@ int main(int argc, char *argv[])
|
||||
/* no need to do "decode all" read_mode if PCM checking is available */
|
||||
if (rawfilename && read_mode > 1)
|
||||
continue;
|
||||
if (strlen(flacfilename) > 4 && 0 == strcmp(flacfilename+strlen(flacfilename)-4, ".ogg")) {
|
||||
if (strlen(flacfilename) > 4 && (0 == strcmp(flacfilename+strlen(flacfilename)-4, ".oga") || 0 == strcmp(flacfilename+strlen(flacfilename)-4, ".ogg"))) {
|
||||
#if FLAC__HAS_OGG
|
||||
ok = seek_barrage(/*is_ogg=*/true, flacfilename, flacfilesize, count, samples, read_mode, rawfilename? pcm : 0);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user