[vlc-devel] [PATCH] vdummy: don't crash when used with hardware decoding

Rémi Denis-Courmont remi at remlab.net
Fri Sep 29 14:58:14 CEST 2017


Le perjantaina 29. syyskuuta 2017, 14.46.23 EEST Steve Lhomme a écrit :
> ---
>  modules/video_output/vdummy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/modules/video_output/vdummy.c b/modules/video_output/vdummy.c
> index 40d54b9b96..00f6ac17d9 100644
> --- a/modules/video_output/vdummy.c
> +++ b/modules/video_output/vdummy.c
> @@ -147,7 +147,7 @@ static void DisplayStat(vout_display_t *vd, picture_t
> *picture, subpicture_t *su {
>      VLC_UNUSED(vd);
>      VLC_UNUSED(subpicture);
> -    if (vd->fmt.i_width*vd->fmt.i_height >= sizeof(mtime_t)) {
> +    if (vd->fmt.i_width*vd->fmt.i_height >= sizeof(mtime_t) &&
> picture->p->p_pixels) { mtime_t date;
>          memcpy(&date, picture->p->p_pixels, sizeof(date));
>          msg_Dbg(vd, "VOUT got %"PRIu64" ms offset",

I am not sure we can nor should assume anything about p_pixels. Better check 
the pixel pitch if you want to ensure storage space.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list