[MPlayer-dev-eng] [PATCH] VFCTRL_PAUSE_UPDATE
Rich Felker
dalias at aerifal.cx
Fri Sep 16 07:04:53 CEST 2005
On Thu, Sep 15, 2005 at 10:40:54PM -0500, Joey Parrish wrote:
> On Thu, Sep 15, 2005 at 02:30:06PM -0400, Jason Tackaberry wrote:
> > On Thu, 2005-09-15 at 18:56 +0200, Reimar Döffinger wrote:
> > > Actually I'd like to suggest the attached patch instead.
> > [...]
> > > +static int periodic_update(vf_instance_t *vf, vo_functions_t *vo,
> > > + float time_avail) {
> > > + int res;
> > > + if (!vf) return 0;
> > > + if (time_avail < 0.01) return 1;
> >
> > Actually this last line is a bit arbitrary. In fact, 1000 microseconds
> > is a lot of time depending on what needs to be done. And what needs to
> > be done will depend on the filter. Why not remove that constraint and
> > let the filter decide if it should update or not? Since the filter is
> > given time_avail and it knows what it needs to do, it will be able to
> > make a more intelligent choice.
> >
> > (And empirically commenting this line out this seems to work better for
> > me.)
>
> I think the notion is that since floats are by their nature not exact,
> you can't say if (time_avail == 0.0).
While the "not exact" thing is in a sense true, a float to which you
assign 0.0 does not magically suddenly take on a different value.
> Possibly the constraint doesn't
> need to be there anyhow, but I'm guessing that was the thought behind
> that line of code.
I dunno.
Rich
More information about the MPlayer-dev-eng
mailing list