[vlc-devel] [PATCH] decoder: don't request a vout in loop
Thomas Guillem
thomas at gllm.fr
Mon Sep 26 14:46:19 CEST 2016
On Mon, Sep 26, 2016, at 14:24, Rémi Denis-Courmont wrote:
> Le lundi 26 septembre 2016, 09:11:21 Thomas Guillem a écrit :
> > On Sat, Sep 24, 2016, at 01:26, remi at remlab.net wrote:
> > > Hello,
> > >
> > > Le 23 sept. 2016 11:16, Thomas Guillem <thomas at gllm.fr> a écrit :
> > > > Don't try to request a vout if it previously failed. A new vout
> > > > will be
> > > > requested if the fmt_out changes. This save a *lot* of CPU cycles
> > > > when playing
> > > > a sample with an invalid fmt_out.
> > >
> > > It does if the decoder changes the format at every buffer allocation.
> > > But I understood you would fix that?
> >
> > I never saw that case. If this case happen, is it not the fault of
> > the module ?
> >
> > > Then there is not much to save anymore - and it breaks the corner case
> > > where vout creation fails before it "somehow" succeeds.
> >
> > Can this really happen ? A vout that succeed after a fail when the dec-
> > >fmt_out doesn't change at all ?
>
> Sure. You can fail to allocate video memory for your vout pool, then
> after
> some other app terminates, succeed.
We can try in loop if module_load returns VLC_ENOMEM, otherwise we retry
only if the fmt changes.
>
> Now, I'm not sure if pool failure is currently treated as a vout creation
> failure, or if it merely returns a silently non-working vout. But the
> later
> would be a vout core bug.
>
> > > I would rather decouple format change and picture allocation first.
> > > Then re-evaluate whether this patch still makes sense.
> >
> > Then, do you agree with my patch set "[PATCH 0/3] decoder: don't update
> > format when creating a buffer" ?
> > I can do it for audio and video.
>
> Conceptually, yes. I have not reviewed it.
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list