gstinfo: Make GST_DEBUG_PAD_NAME "MT crash safe"
Submitted by Håvard Graff (hgr)
Link to original bug (#761916)
Description
Created attachment 320952
test and fix
The pad may be unparented while this macro is called which could result
in a segfault. The new macro protects against this. The parent may still
be disposed while the macro is called, but this will not result in a
crash (but the parent name may be garbage). Using gst_pad_get_parent ()
is undesirable since it takes the object lock.
The patch take advantage of compound expressions available as a C
extension in GCC and some other compilers.
Patch 320952, "test and fix":
gstinfo-debug-pad-name-macro-fix.patch