[MPlayer-dev-eng] [PATCH] Multiple files for MEncoder

Oded Shimon ods15 at ods15.dyndns.org
Tue Feb 8 18:58:54 CET 2005


On Tuesday 08 February 2005 19:55, D Richard Felker III wrote:
> On Tue, Feb 08, 2005 at 11:27:35AM +0200, Oded Shimon wrote:
> > As most of you probably know, I've been working on multiple file support
> > for MEncoder. this patch is a "first draft". Things which could be
> > improved: 1. Somehow remove redundancy by not having most of the same
> > video init code twice. The init for each next file is a little different
> > from the first file, so I couldn't just 'goto' to before the init, but
> > repetitive code is always bad...
>
> overall the patch looks like a good start, but i agree this part is
> really bad. can the duplication be reduced by putting most of this
> init code into a separate function call?

Well, yes, but it would need filename, demuxer, sh_video, sh_audio, muxer, 
mux_v, mux_a, etc... it would be the longest param line ever.
The only solution I can see is wrapping most of the stuff  in the initing in 
the begginning which isn't done twice around an 'if'. Not very elegant, but 
better than repetetive code I think.

- ods15




More information about the MPlayer-dev-eng mailing list