After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776084 - vaapipostproc: segfault when direct-uploading an unsupported color-space
vaapipostproc: segfault when direct-uploading an unsupported color-space
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal normal
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-14 10:25 UTC by Florent Thiéry
Modified: 2016-12-21 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapivideomemory: change return type of allocator_configure_surface_info (2.62 KB, patch)
2016-12-21 05:29 UTC, Hyunjun Ko
reviewed Details | Review
vaapivideomemory: change return type of allocator_configure_surface/image_info (3.92 KB, patch)
2016-12-21 08:40 UTC, Hyunjun Ko
committed Details | Review

Description Florent Thiéry 2016-12-14 10:25:40 UTC
The following segfaults:

gst-launch-1.0 filesrc location=/dev/zero ! rawvideoparse width=3840 height=2160 framerate=30 format=rgb ! vaapipostproc ! 'video/x-raw, width=(int)1920, height=(int)1080' ! fakesink
Comment 1 Hyunjun Ko 2016-12-15 07:42:04 UTC
This is caused by a failure in gst_vaapi_video_format_get_best_native to get chroma_type in case that the format is "RGB"

If set rgba/rgbx/bgra/bgrx to the sink caps, it's working.
But we should fix this crash at least.
Comment 2 Hyunjun Ko 2016-12-21 05:29:30 UTC
Created attachment 342297 [details] [review]
vaapivideomemory: change return type of allocator_configure_surface_info

To detect and handle errors, which is happening
during allocator_configure_surface_info.
Comment 3 Víctor Manuel Jáquez Leal 2016-12-21 08:20:59 UTC
Comment on attachment 342297 [details] [review]
vaapivideomemory: change return type of allocator_configure_surface_info

would be nice to do the same in allocator_configure_image_info()
Comment 4 Hyunjun Ko 2016-12-21 08:40:56 UTC
Created attachment 342310 [details] [review]
vaapivideomemory: change return type of  allocator_configure_surface/image_info

To detect and handle errors, which is happening
during execution of allocator_configure_surface/image_info.
Comment 5 Víctor Manuel Jáquez Leal 2016-12-21 09:58:54 UTC
Thanks!

But this solution doesn't fix the real problem: in this pipeline the negotiation caps occur when the VA display hasn't been created, so all the "possible" formats are negotiated, even though the hardware hasn't been queried for its supported formats.

In this case, RGB format is not supported by the hardware, but the caps are still negotiated. The error should have occurred in the caps negotiation.

One possible solution is to expose in the caps template the possible raw formats when registering the vaapipostproc element.
Comment 6 Víctor Manuel Jáquez Leal 2016-12-21 10:32:21 UTC
committed with minor modifications.