[Flac-dev] Proposed change to code that handles output_prefix

Josh Coalson xflac at yahoo.com
Tue Aug 20 10:02:05 PDT 2002


--- Justin Akehurst <akehurst at poindextrose.org> wrote:
> 
> On line 734 in src/flac/main.c, ver 1.77, change:
> 
> strcat(outfilename, infilename);
> 
> to
> 
> strcat(outfilename, flac__file_get_basename(infilename));
> 
> I did this change because I was calling flac with an input filename
> with a
> path on the front of it, and I wanted the output file to go to a
> different
> location, such as this:
> 
> flac --best --output-prefix /usr/share/flac
> /home/akehurst/tmp/my_file.wav
> 
> before the change, it was just concatenating the input filename to
> the
> output prefix.

The reason it is like that is so that you can preserve the
hierarchy of the input directory.  e.g.

  flac --output-prefix=/a/b/ x/1.wav y/2.wav

will give you /a/b/x/1.flac and /a/b/y/2.flac (also note
the trailing slash on the output prefix).  To do what you're
describing you can do:

(cd /home/akehurst/tmp && flac --output-prefix=/usr/share/flac/
my_file.wav)

But if I used the basename, the power of --output-prefix
drops and I can no longer do the former.

Josh


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com




More information about the Flac-dev mailing list