馃悰 Fix segfaults in writer and gstshmdatasrc
Fixing two separate segfaults:
- In the
gst_shmdata_src_on_server_connect
function fromgstshmdatasrc.c
, sometimesuser_data
cannot be cast into aGstShmdataSrc
pointer, which results in the function trying to access thecaps
property of aNULL
pointer and causing a segfault. - In the
copy_to_shm
function fromwriter.cpp
, sometimes the function tries to lock a semaphore that doesn't exist or isn't valid.