msdkh264enc crashes in case Intel Media SDK is not available (e.g. wrong Hardware/CPU)
Simple pipeline using msdkh264enc crashes in case Intel Media SDK is not available (e.g. wrong Hardware/CPU):
$ GST_DEBUG=*:3,msdk*:7 gst-launch-1.0 videotestsrc ! msdkh264enc hardware=0 ! fakesink silent=false -v
0:00:00.006098972 1712 0x188da90 INFO msdk msdk.c:186:msdk_open_session: MSDK implementation: 0x0402 (HARDWARE)
0:00:00.006131912 1712 0x188da90 INFO msdk msdk.c:187:msdk_open_session: MSDK version: 1.29
0:00:00.086067758 1711 0x1ebaa70 INFO msdk msdk.c:186:msdk_open_session: MSDK implementation: 0x0402 (HARDWARE)
0:00:00.086100319 1711 0x1ebaa70 INFO msdk msdk.c:187:msdk_open_session: MSDK version: 1.29
Setting pipeline to PAUSED ...
0:00:00.087875925 1711 0x1ebaa70 ERROR msdk msdk.c:168:msdk_open_session: Intel Media SDK not available (undeveloped feature)
(gst-launch-1.0:1711): GStreamer-CRITICAL **: 20:44:47.918: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed
0:00:00.087968317 1711 0x1ebaa70 ERROR default gstmsdkcontextutil.c:225:gst_msdk_context_ensure_context:<msdkh264enc0> Context creation failed
0:00:00.087979507 1711 0x1ebaa70 INFO msdkenc gstmsdkenc.c:1429:gst_msdkenc_start:<msdkh264enc0> Creating new context (NULL)
Caught SIGSEGV
Spinning. Please run 'gdb gst-launch-1.0 1711' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
$ gdb gst-launch-1.0 1711
(gdb) where
#0 0x00007f488b8d4d30 in nanosleep () at /lib64/libpthread.so.0
#1 0x00007f488b97139f in g_usleep () at /usr/lib64/libglib-2.0.so.0
#2 0x0000000000404572 in fault_spin () at gst-launch.c:113
#3 0x0000000000404572 in fault_handler_sighandler (signum=11) at gst-launch.c:94
#4 0x00007f488b8d5870 in <signal handler called> () at /lib64/libpthread.so.0
#5 0x00007f488afff050 in gst_msdk_context_add_shared_async_depth (context=0x0, async_depth=4) at gstmsdkcontext.c:601
#6 0x00007f488b00b669 in gst_msdkenc_start (encoder=0x207b110) at gstmsdkenc.c:1432
#7 0x00007f488b1aa86e in gst_video_encoder_change_state (element=0x207b110, transition=GST_STATE_CHANGE_READY_TO_PAUSED)
at gstvideoencoder.c:1597
#8 0x00007f488bb0a29e in gst_element_change_state
(element=element@entry=0x207b110, transition=transition@entry=GST_STATE_CHANGE_READY_TO_PAUSED) at gstelement.c:2952
#9 0x00007f488bb0a9be in gst_element_set_state_func (element=0x207b110, state=GST_STATE_PAUSED) at gstelement.c:2906
#10 0x00007f488bae7997 in gst_bin_element_set_state
(next=GST_STATE_PAUSED, current=GST_STATE_READY, start_time=0, base_time=0, element=0x207b110, bin=0x207e140) at gstbin.c:2601
#11 0x00007f488bae7997 in gst_bin_change_state_func (element=0x207e140, transition=GST_STATE_CHANGE_READY_TO_PAUSED) at gstbin.c:2943
#12 0x00007f488bb0a29e in gst_element_change_state (element=element@entry=0x207e140, transition=GST_STATE_CHANGE_READY_TO_PAUSED)
at gstelement.c:2952
#13 0x00007f488bb0ac9e in gst_element_continue_state (element=element@entry=0x207e140, ret=ret@entry=GST_STATE_CHANGE_SUCCESS)
at gstelement.c:2660
#14 0x00007f488bb0a485 in gst_element_change_state
(element=element@entry=0x207e140, transition=transition@entry=GST_STATE_CHANGE_NULL_TO_READY) at gstelement.c:2991
#15 0x00007f488bb0a9be in gst_element_set_state_func (element=0x207e140, state=GST_STATE_PAUSED) at gstelement.c:2906
#16 0x0000000000403cdc in main (argc=<optimized out>, argv=<optimized out>) at gst-launch.c:1133
(gdb)
- OS: Linux openSUSE Tumbleweed
- GStreamer: 1.15.2
- Hardware: AMD Ryzen 7 1800X