[MPlayer-dev-eng] [RFC] defines for demux seek flags

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Jan 28 13:00:44 CET 2008


Hello,
On Mon, Jan 28, 2008 at 01:50:48AM -0500, Rich Felker wrote:
> On Sun, Jan 27, 2008 at 09:13:13AM +0100, Reimar Döffinger wrote:
> > > @@ -79,14 +79,14 @@ static void demux_demuxers_seek(demuxer_t *demuxer,float rel_seek_secs,float aud
> > >  
> > >    if(priv->ad != priv->vd) {
> > >      sh_audio_t* sh = (sh_audio_t*)demuxer->audio->sh;
> > > -    demux_seek(priv->ad,pos,audio_delay,1);
> > > +    demux_seek(priv->ad,pos,audio_delay,(struct seekflags){.absolute=1});
> > 
> > I find this really, really ugly.

To the question if that's not just because I am not used to the syntax:
I doubt that is the reason, I really dislike it when an assortment of
special characters band together: (){.=}) - I'm quite sure I'll love
LISP before I find this non-ugly. That the "struct seekflags" wastes
quite a lot of characters to provide not much information isn't a plus
either. If C could do without this "cast" I could probably somewhat like
it.

> Agree. Can we have an absolute policy that bitfields are forbidden in
> MPlayer? They're ugly and have no practical benefit. They're an
> unnecessary abstraction from just defining bitwise constants yourself,
> and one which offers no potential for optimization.

I think your opinion is a bit extreme, and what concerns optimization
gcc seems to handle them well enough.
Though I do not like the fact that until at least gcc 4.2.0 there
obviously was not a single test case for 1-bit int bitfields in gcc's
testsuite...



More information about the MPlayer-dev-eng mailing list