vdpau/chroma: NULL dereference on error
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 23 Apr 2014 17:38:04 +0000 (20:38 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 23 Apr 2014 17:38:04 +0000 (20:38 +0300)
modules/hw/vdpau/chroma.c

index 2ac13d7..acd9fce 100644 (file)
@@ -324,6 +324,8 @@ static picture_t *VideoExport(filter_t *filter, picture_t *src, picture_t *dst)
     void *planes[3];
     uint32_t pitches[3];
 
     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;
     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_Release(dst);
         dst = NULL;
     }
-    picture_CopyProperties(dst, src);
     picture_Release(src);
     return dst;
 }
     picture_Release(src);
     return dst;
 }