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
This makes it >10x faster if more than a single value is requested
by not searching in the GSequence for every value and converting
the value from GValue to the real value type.
Previous code treated "1/1yourmom" the same as "1/1" and "1wimsmom" the
same as "1". Now the code is stricter and will fail to convert a
fraction when followed by garbage text.
This may cause crashes when logging is enabled, especially on windows.
It's not safe to pass random pointers to g_type_check_instance_is_a().
Fixes#611719.