MMFMWK-8185 vpu_dec_object: return error when vpu decode buffer fail

return GST_FLOW_ERROR to shut down pipeline when vpu
decode buffer fail. This can avoid segfault when vpu
allocate cma fail if cma is low.

Signed-off-by: Haihua Hu <jared.hu@nxp.com>
diff --git a/plugins/vpu/gstvpudecobject.c b/plugins/vpu/gstvpudecobject.c
index ae4e170..2fe10d0 100755
--- a/plugins/vpu/gstvpudecobject.c
+++ b/plugins/vpu/gstvpudecobject.c
@@ -857,7 +857,12 @@
   if (IS_HANTRO() && vpu_dec_object->implement_config) {
     VpuBufferNode in_data = {0};
     int buf_ret;
-    VPU_DecDecodeBuf(vpu_dec_object->handle, &in_data, &buf_ret);
+    dec_ret = VPU_DecDecodeBuf(vpu_dec_object->handle, &in_data, &buf_ret);
+    if (dec_ret != VPU_DEC_RET_SUCCESS) {
+      GST_ERROR_OBJECT(vpu_dec_object, "VPU_DecDecodeBuf fail: %s", \
+          gst_vpu_dec_object_strerror(dec_ret));
+      return GST_FLOW_ERROR;
+    }
   }
 
   if (!gst_vpu_dec_object_register_frame_buffer (vpu_dec_object, bdec)) {