From: Rémi Denis-Courmont Date: Wed, 23 Apr 2014 17:38:04 +0000 (+0300) Subject: vdpau/chroma: NULL dereference on error X-Git-Tag: 2.2.0-git~650 X-Git-Url: https://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=df3637568c2a2a1d8e9781143bbef7bcb1f3b79e vdpau/chroma: NULL dereference on error --- diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c index 2ac13d7e4c..acd9fcecf5 100644 --- a/modules/hw/vdpau/chroma.c +++ b/modules/hw/vdpau/chroma.c @@ -324,6 +324,8 @@ static picture_t *VideoExport(filter_t *filter, picture_t *src, picture_t *dst) void *planes[3]; uint32_t pitches[3]; + picture_CopyProperties(dst, src); + for (int i = 0; i < dst->i_planes; i++) { planes[i] = dst->p[i].p_pixels; @@ -346,7 +348,6 @@ static picture_t *VideoExport(filter_t *filter, picture_t *src, picture_t *dst) picture_Release(dst); dst = NULL; } - picture_CopyProperties(dst, src); picture_Release(src); return dst; }