[MPlayer-dev-eng] Better handling of low FPS and still images

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Aug 24 09:06:35 CEST 2007


Hello,
On Fri, Aug 24, 2007 at 09:48:32AM +0300, Uoti Urpala wrote:
> On Fri, 2007-08-24 at 07:53 +0200, Reimar Döffinger wrote:
> > > I'm against ever using bitfields, for technical reasons.
> > 
> > I do not like it all either. They are even more of a mess if they ever
> > need to be passed to a function.
> 
> If the flags are for some reason more likely to need passing together
> than other fields of the struct (so you don't pass it as a whole) then
> you can use a substruct for them. I think s.flags.field is still more
> readable than manual bit masking calculations. Anyway this isn't really
> relevant to the use of bitfields in the original patch.

Well, manual bitmasking has the effect of grouping the flags together.
But I had another look and saw that the flags don't have too much to do
with each other, the original variable name was bad anyway and it is in
a struct that is only used in a very small part of MPlayer.
So although I still dislike bitfields (though it would be waste to put
each into their own int) I won't uphold by objections except for:

> -  if(!select)
> -    key_fds[num_key_fd].flags |= MP_FD_NO_SELECT;
> +  key_fds[num_key_fd].no_select = !select;

This does not do the same and IMO should not be changed in the same
patch as the other more cosmetic changes (there is at least one more
such change).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list