From ffa82e07a7b914a3b26eeec5211ca57957aea383 Mon Sep 17 00:00:00 2001 From: Haihao Xiang Date: Mon, 19 Aug 2019 12:30:30 +0800 Subject: [PATCH] msdkvpp: don't return GST_FLOW_ERROR for MFX_WRN_INCOMPATIBLE_VIDEO_PARAM Returning MFX_WRN_INCOMPATIBLE_VIDEO_PARAM means MSDK detects some incompatible parameters but it is resolved, and we may not regard MFX_WRN_INCOMPATIBLE_VIDEO_PARAM as a fatal error. In this fix, GST_FLOW_OK is returned but with a warning message so that a pipeline may run to the end. --- sys/msdk/gstmsdkvpp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/msdk/gstmsdkvpp.c b/sys/msdk/gstmsdkvpp.c index 937ea43401..9432dc5d81 100644 --- a/sys/msdk/gstmsdkvpp.c +++ b/sys/msdk/gstmsdkvpp.c @@ -735,7 +735,10 @@ gst_msdkvpp_transform (GstBaseTransform * trans, GstBuffer * inbuf, g_usleep (1000); }; - if (status != MFX_ERR_NONE && status != MFX_ERR_MORE_DATA + if (status == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM) + GST_WARNING_OBJECT (thiz, "VPP returned: %s", + msdk_status_to_string (status)); + else if (status != MFX_ERR_NONE && status != MFX_ERR_MORE_DATA && status != MFX_ERR_MORE_SURFACE) goto vpp_error;