[FFmpeg-devel] [PATCH] flac demuxer
Sat May 3 13:52:14 CEST 2008
On Sat, May 03, 2008 at 07:24:51AM -0400, Justin Ruggles wrote:
> Michael Niedermayer wrote:
> > On Fri, May 02, 2008 at 06:21:35PM -0400, Justin Ruggles wrote:
> >> Michael Niedermayer wrote:
> >>> On Mon, Apr 28, 2008 at 12:51:10AM -0400, Justin Ruggles wrote:
> >>>> Justin Ruggles wrote:
> >>>>> Hi,
> >>>>> This patch splits out the FLAC demuxer from raw.c. It has added
> >>>>> functionality to read the raw FLAC header, including all metadata. The
> >>>>> function to read the streaminfo header needs to be shared with the FLAC
> >>>>> decoder, so it has been put in lavc.
> >>>>> * svn cp libavformat/raw.c libavformat/flacdec.c
> >> Here is a patch just to create a new flac demuxer file by copying the
> >> relevant functions from raw.c. Each function will be modified later to
> >> be more specific to FLAC instead of the current generic raw demuxing.
> > copying (code duplication), and later changing part of it really sounds
> > ugly and wrong.
> > If you want to split raw.c that surely can be done without any code
> > clone and mutate, also spliting raw.c has nothing to to with flac.
> I'm a bit confused. My goal is to put the flac demuxer in its own file
> so I can add flac-specific header parsing (eventually seeking) without
> cluttering up raw.c. Would it be better to just write it from scratch
> all at once, along with removal from raw.c instead of copying?
The problem is the code duplication not how you end up with code duplication.
Explicitly copying code or implementing from scratch the same functions makes
You can add whatever functions are needed to raw.c. If you dislike this you
have to split raw.c cleanly, copying whatever code you need into a new file
so it exists twice is absolutely not ok.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I wish the Xiph folks would stop pretending they've got something they
do not. Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel