msdk: make sure the surface data is set for GST_VIDEO_FORMAT_P010_10LE
authorXiang, Haihao <haihao.xiang@intel.com>
Fri, 16 Nov 2018 06:18:36 +0000 (14:18 +0800)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Mon, 26 Nov 2018 16:47:17 +0000 (16:47 +0000)
P010_10LE and NV12 have the same layout, so we may reuse the code.

sys/msdk/gstmsdksystemmemory.c

index 54ee2ae..69d3662 100644 (file)
@@ -78,6 +78,7 @@ ensure_data (GstMsdkSystemMemory * mem)
 
   switch (GST_VIDEO_INFO_FORMAT (info)) {
     case GST_VIDEO_FORMAT_NV12:
+    case GST_VIDEO_FORMAT_P010_10LE:
       mem->surface->Data.Y = mem->cached_data[0];
       mem->surface->Data.UV = mem->cached_data[1];
       mem->surface->Data.Pitch = mem->destination_pitches[0];