[vlc-devel] [PATCH 2/5] vout: handle video context change

Steve Lhomme robux4 at ycbcr.xyz
Tue Oct 20 16:04:54 CEST 2020


On 2020-10-20 14:32, Romain Vimont wrote:
> From: Alexandre Janniaux <ajanni at videolabs.io>
> 
> ---
>   src/video_output/video_output.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
> index 15c1f0e3ee..84e93a7381 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -1070,7 +1070,7 @@ static void ThreadChangeFilters(vout_thread_sys_t *vout)
>           vlc_array_clear(array);
>       }
>   
> -    if (!es_format_IsSimilar(p_fmt_current, &fmt_target)) {
> +    if (!es_format_IsSimilar(p_fmt_current, &fmt_target) || vctx_current != vctx_target) {

I don't think it's safe to compare pointers. There should be a 
comparison fonction for video context (and in general wherever 
video_format_IsSimilar is used you probably need to compare the video 
context too).

See 
https://mailman.videolan.org/pipermail/vlc-devel/2019-November/129383.html
https://mailman.videolan.org/pipermail/vlc-devel/2019-November/129385.html
https://mailman.videolan.org/pipermail/vlc-devel/2019-November/129386.html
https://mailman.videolan.org/pipermail/vlc-devel/2019-November/129388.html

>           msg_Dbg(&vout->obj, "Changing vout format to %4.4s",
>                               (const char *) &p_fmt_current->video.i_chroma);
>   
> -- 
> 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