[vlc-commits] vdpau/chroma: NULL dereference on error

Rémi Denis-Courmont git at videolan.org
Wed Apr 23 19:38:16 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 23 20:38:04 2014 +0300| [df3637568c2a2a1d8e9781143bbef7bcb1f3b79e] | committer: Rémi Denis-Courmont

vdpau/chroma: NULL dereference on error

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=df3637568c2a2a1d8e9781143bbef7bcb1f3b79e
---

 modules/hw/vdpau/chroma.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index 2ac13d7..acd9fce 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;
 }



More information about the vlc-commits mailing list