[MPlayer-dev-eng] [PATCH] split filter_n_bytes function a bit

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Nov 4 09:45:43 CET 2007


Hello,
On Sun, Nov 04, 2007 at 12:24:00AM +0200, Uoti Urpala wrote:
> On Sat, 2007-11-03 at 15:16 +0100, Reimar Döffinger wrote:
> > Hello,
> > I for some reason didn't like that it does two mostly unrelated things:
> > decoding to fill the in buffer with data and passing it through the
> > filter chain.
> > Attached patch patch would split it. Objections?
> 
> There are phases in the functionality but so there are in most
> functions. IMO splitting the flow of the function into dozen-line
> subfunctions is harmful.

I'd consider a dozen lines enough for a function. But I mostly dislike
that the decoding is hidden within a function that only has "filter" in
its name. I don't know if it's possible but I'd actually like to get the
decoding (including eof/error handling) out of there completely, and
splitting would be a first step.

> Additionally your patch breaks the EOF/error logic.

I don't see it right now, can you explain?

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list