GNOME Bugzilla – Bug 793889
vaapisink: Crashes on padded (non-alpha) RGB video with AMD card
Last modified: 2018-11-03 15:53:30 UTC
$ gst-launch-1.0 multifilesrc location="/tmp/white.png" caps="image/png,framerate=\(fraction\)3/1" ! pngdec ! videoconvert ! identity silent=false ! vaapisink -v Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Got context from element 'vaapisink0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx1"; /GstPipeline:pipeline0/GstIdentity:identity0: last-message = event ******* (identity0:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)116c669c7f52880c9f1b179be1334a19, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;) 0x55bdcbc9a8f0 /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0.GstPad:src: caps = image/png, width=(int)1, height=(int)1, framerate=(fraction)3/1 /GstPipeline:pipeline0/GstPngDec:pngdec0.GstPad:sink: caps = image/png, width=(int)1, height=(int)1, framerate=(fraction)3/1 /GstPipeline:pipeline0/GstPngDec:pngdec0.GstPad:src: caps = video/x-raw, format=(string)RGB, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)3/1 /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240, framerate=(fraction)3/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstIdentity:identity0: last-message = event ******* (identity0:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)BGRx\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)3/1\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1";) 0x7f5cd8005030 /GstPipeline:pipeline0/GstIdentity:identity0.GstPad:src: caps = video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240, framerate=(fraction)3/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstVaapiSink:vaapisink0.GstPad:sink: caps = video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240, framerate=(fraction)3/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstIdentity:identity0.GstPad:sink: caps = video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240, framerate=(fraction)3/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)RGB, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)3/1 /GstPipeline:pipeline0/GstIdentity:identity0: last-message = event ******* (identity0:sink) E (type: segment (17934), GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";) 0x55bdcbc9aa40 /GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (307200 bytes, dts: none, pts: 0:00:00.000000000, duration: 0:00:00.333333333, offset: -1, offset_end: -1, flags: 00000040 discont , meta: GstVideoMeta, GstVaapiVideoMeta) 0x7f5cd8009410 Caught SIGSEGV
+ Trace 238439
Created attachment 369045 [details] Test vector (indexed color PNG without alpha channel)
Notice format=(string)BGRx in the output above. Adding a caps filter to use BGRA, or RGBA will avoid the crash. (The color will still be very wrong because of https://bugzilla.gnome.org/show_bug.cgi?id=793886)
Created attachment 369047 [details] Backtrace
No output is written to dmesg during the crash.
*** Bug 793890 has been marked as a duplicate of this bug. ***
Created attachment 369092 [details] Test vector (MP4 raw RGB video)
The attached MP4 file seems to trigger the same crash with a slightly different pixel format (RGB instead of BGRx).
(In reply to Alicia Boya García from comment #7) > The attached MP4 file seems to trigger the same crash with a slightly > different pixel format (RGB instead of BGRx). The playbin pipeline includes a videoconvert that converts RGB to RGBx. RGB is not accepted by vaapisink caps, so the problem only occurs with RGBx and BGRx.
The crash can be reproduced with videotestsrc too. All the following segfault: $ gst-launch-1.0 -v videotestsrc ! video/x-raw, format=RGBx ! vaapisink $ gst-launch-1.0 -v videotestsrc ! video/x-raw, format=BGRx ! vaapisink
Thx for the report. Is it also with mesa 17.2.4 ? Does it succeed with other format (NV12) ? Same result with a tee element in between ? (maybe something woring when the sink proposes a pool)
Can you try also with GST_VAAPI_ENABLE_DIRECT_RENDERING=0 (not sure if it affects vaapisink though) ?
(In reply to Julien Isorce from comment #10) > Thx for the report. Is it also with mesa 17.2.4 ? Does it succeed with other > format (NV12) ? Same result with a tee element in between ? (maybe something > woring when the sink proposes a pool) Yes to all. Name : mesa-dri-drivers Version : 17.3.5 OpenGL renderer string: AMD Radeon (TM) RX 460 Graphics (AMD POLARIS11 / DRM 3.19.0 / 4.14.16-300.fc27.x86_64, LLVM 5.0.0) Fedora 27 X11 (In reply to Julien Isorce from comment #11) > Can you try also with GST_VAAPI_ENABLE_DIRECT_RENDERING=0 (not sure if it > affects vaapisink though) ? It makes no difference.
(In reply to Alicia Boya García from comment #12) > (In reply to Julien Isorce from comment #10) > > Thx for the report. Is it also with mesa 17.2.4 ? Does it succeed with other > > format (NV12) ? Same result with a tee element in between ? (maybe something > > woring when the sink proposes a pool) > > Yes to all. I'll be more explicit just in case: * It is also mesa 17.2. * It succeeds with NV12. * It crashes with a tee element in between too. > Name : mesa-dri-drivers > Version : 17.3.5 Pasted wrong console output, it's actually: Installed Packages Name : mesa-dri-drivers Version : 17.2.4
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/86.