[MPlayer-dev-eng] [PATCH] VFCTRL_PAUSE_UPDATE
Joey Parrish
joey at nicewarrior.org
Fri Sep 16 05:40:54 CEST 2005
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). Possibly the constraint doesn't
need to be there anyhow, but I'm guessing that was the thought behind
that line of code.
--Joey
--
"There's no blood in your brain? You're one of the lucky ones." --Chad
More information about the MPlayer-dev-eng
mailing list