prctl is supposed to take 5 arguments. It used to work with 2 arguments on some
versions of libc because it is defined as a varags function there.
See #611911
This either must never happen (which makes sense in this case) and thus should
use assert() or we should use a traditional if (poll_data->message) return;
to avoid differnet behaviour of intenal api when compiling with
G_DISABLE_CHECKS.
This avoids creating empty caps and destroying them in the case of an error. We
also avoid double checking in other code path where we call the internal api.
See 8fe63000de for why having a TRUE/FALSE
return value is a bad idea.
I've scanned a few plugins and they generally get it wrong and aren't
unloadable when they return FALSE.
This is what can happen in a plugin_init function:
- An element based on GstBaseSink is registered
- Other elements fail to register
- The plugin_init function returns FALSE
Now if this the plugin is the first plugin to link against
libgstbase.so, it will have caused libgstbase.so to be loaded and static
strings from that library will have been added to gobject while
registering GstBaseSink.
So unloading the plugin will cause those strings to go stale and the
next plugin using GstBaseSink will crash. So we must not unload modules
after calling into them ever.
https://bugzilla.redhat.com/show_bug.cgi?id=572800
Newer versions of BASH (4.x?) seem to dislike using -1 for a return. Even
though it's documented as being signed, BASH complains about it, so use
255 instead.
This brings total call speedups between 5% and 25%.
gst_caps_set_simple_valist: +5%
gst_structure_set_valist: + 10%
gst_structure_id_set_valist: +25%
gst_tag_list_add_valist: +5%
Measured using valgrind when run over the discovery of 200 media files.
Fixes#610256
It triggers for a lot of GStreamer API (even though those triggers are
wrong most of the time).
I missed it because it only triggers with -O2, and I was using -O0.
None of these flags cause warnings anymore, so no fixes necessary.
The flags are:
-Wformat-nonliteral
-Wformat-security
-Wold-style-definition
-Wcast-align
-Winline
-Winit-self
-Wmissing-include-dirs
-Waddress
-Waggregate-return
-Wno-multichar
-Wnested-externs
The alignment guaranteed by malloc is not always sufficient. E.g. vector
instructions or hardware subsystems want specifically aligned buffers. The
attached patch will use posix_memalign if available to allocate buffers.
The desired alignment can be set when running configure using the new
--with-buffer-alignment option.
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.
Also adds -Wwrite-strings as a warning flag in configure.ac.
https://bugzilla.gnome.org/show_bug.cgi?id=611692
Adds that warning to configure.ac
Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.
https://bugzilla.gnome.org/show_bug.cgi?id=611692