When gst_vaapi_plugin_base_get_input_buffer() fail to copy the input buffer
into a VAAPI buffer, the return value is GST_FLOW_NOT_SUPPORTED, and it was
ignored by the vaapisink, leading to a segmentation fault.
This patch ignores the frame that generated the GST_FLOW_NOT_SUPPORTED
returned by gst_vaapi_plugin_base_get_input_buffer(), avoiding the
segmentation fault, but doing and effort to continue rendering. This is
the same behavior of ximagesink.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=759332
ret = gst_vaapi_plugin_base_get_input_buffer (GST_VAAPI_PLUGIN_BASE (sink),
src_buffer, &buffer);
- if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_SUPPORTED)
+ if (ret == GST_FLOW_NOT_SUPPORTED)
+ return GST_FLOW_OK; /* let's ignore the frame if it couldn't be uploaded */
+ if (ret != GST_FLOW_OK)
return ret;
meta = gst_buffer_get_vaapi_video_meta (buffer);