kmssink: don't dump hdr10 meta when buffer is NULL
When resize, show frame input buffer will be NULL, so need check
if buffer is NULL before dump hdr10 meta
upstream status: i.mx specific
diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
index c1814c7..6086a06 100644
--- a/sys/kms/gstkmssink.c
+++ b/sys/kms/gstkmssink.c
@@ -1580,7 +1580,11 @@
{
GstVideoHdr10Meta *meta = NULL;
- meta = gst_buffer_get_video_hdr10_meta (buf);
+
+ /* buf could be NULL when resize */
+ if (buf)
+ meta = gst_buffer_get_video_hdr10_meta (buf);
+
if (meta){
/* TODO: just dump temporarily, to do configure to drm driver for hdr10 in future */
GST_INFO_OBJECT (self, "redPrimary x=%d y=%d", meta->hdr10meta.redPrimary[0], meta->hdr10meta.redPrimary[1]);