GNOME Bugzilla – Bug 796513
vaapih265dec: segfault when it starts to decode a delta frame
Last modified: 2018-11-03 15:54:48 UTC
vaapih265dec crashes with an assert failure if stream does not start on keyframe in the i965 driver. gst-launch-1.0: gen9_mfd.c:649: gen9_hcpd_get_reference_picture_frame_id: Assertion `0' failed.
+ Trace 238636
Example pipeline I am using. I the identity shows the first frame as a delta when the crash happens. However if the first frame is a keyframe it will work correctly deocde and play video. GST_DEBUG=3 gst-launch-1.0 -v rtspsrc location=<redacted> ! rtph265depay ! h265parse ! identity silent=false ! decodebin ! videoconvert ! xvimagesink Should the parser not drop data from the stream until a keyframe has passed? I also tried with "h265parse disable-passthrough=true" to try to enable this. Same video source under both conditions (keyframe/delta as first frame) works fine with the avdec_h265 decoder.
would be great if you make a stream that starts with a delta frame thus we could replicate the crash easily. The problem might be in gstreamer-vaapi or in the driver. Not sure yet.
Created attachment 372595 [details] raw byte-stream h265 data that crashes decoder. sure I just captured one with the following. gst-launch-1.0 -v rtspsrc location=<redacted> ! rtph265depay ! h265parse ! video/x-h265, stream-format=byte-stream ! identity silent=false ! filesink location=delta-raw.h265 Then confirmed the crash agin with gst-launch-1.0 filesrc location=delta-raw.h265 ! h265parse ! decodebin ! fakesink and gst-launch-1.0 filesrc location=delta-raw.h265 ! h265parse ! vaapih265dec ! fakesink Some vainfo output may also be useful if its a driver / hw specific vainfo: VA-API version: 1.1 (libva 2.1.0) vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.1.0 vainfo: Supported profile and entrypoints
Hint: I guess the solution is something similar to this patch for H264 https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi/commit/?id=b4e92084 decoder: h264: skip all pictures prior the first I-frame. Don't try to decode pictures until the first I-frame is received within the currently active sequence. There is no point is decoding and then displaying frames with artifacts.
-- 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/98.