[vlc-devel] [PATCH 4/6] video_output: conditionnally render on display
Steve Lhomme
robux4 at ycbcr.xyz
Fri Feb 5 09:55:54 UTC 2021
This is going to mess the sys->render chrono during the time rendering
is suspending.
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
>
More information about the vlc-devel
mailing list