[vlc-devel] [PATCH 4/6] video_output: conditionnally render on display

Alexandre Janniaux ajanni at videolabs.io
Fri Feb 5 10:16:12 UTC 2021


Hi,

Ok, I'll fix that, thanks for the report!

Regards,
--
Alexandre Janniaux
Videolabs

On Fri, Feb 05, 2021 at 10:57:41AM +0100, Thomas Guillem wrote:
>
>
> On Fri, Feb 5, 2021, at 10:55, Steve Lhomme wrote:
> > This is going to mess the sys->render chrono during the time rendering
> > is suspending.
>
> Indeed, chrono_Stop() should not be called in that case.
>
> Then, the next chrono_Start() will drop the last reference.
>
> >
> > On 2021-02-05 10:01, Alexandre Janniaux wrote:
> > > Don't prepare/display if rendering is disabled. Rendering can only be
> > > disabled when taking the display_lock so the prepare/display cannot be
> > > done partially because of this patch.
> > > ---
> > >   src/video_output/video_output.c | 6 ++++--
> > >   1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
> > > index d225e56d8d..11c50871c1 100644
> > > --- a/src/video_output/video_output.c
> > > +++ b/src/video_output/video_output.c
> > > @@ -1405,7 +1405,7 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool render_now)
> > >       const unsigned frame_rate = todisplay->format.i_frame_rate;
> > >       const unsigned frame_rate_base = todisplay->format.i_frame_rate_base;
> > >
> > > -    if (vd->ops->prepare != NULL)
> > > +    if (vd->ops->prepare != NULL && sys->rendering_enabled)
> > >           vd->ops->prepare(vd, todisplay, do_dr_spu ? subpic : NULL, system_pts);
> > >
> > >       vout_chrono_Stop(&sys->render);
> > > @@ -1452,7 +1452,9 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool render_now)
> > >                             frame_rate, frame_rate_base);
> > >
> > >       /* Display the direct buffer returned by vout_RenderPicture */
> > > -    vout_display_Display(vd, todisplay);
> > > +    if (sys->rendering_enabled)
> > > +        vout_display_Display(vd, todisplay);
> > > +
> > >       vlc_mutex_unlock(&sys->display_lock);
> > >
> > >       if (subpic)
> > > --
> > > 2.28.0
> > >
> > > _______________________________________________
> > > vlc-devel mailing list
> > > To unsubscribe or modify your subscription options:
> > > https://mailman.videolan.org/listinfo/vlc-devel
> > >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> 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