The former code allowed an attacker to create a heap overflow by
sending a longer than allowed session id in a response and including a
semicolon to change the maximum length. With this change, the parser
will never go beyond 512 bytes.
Using a single condition variable for synchronization across all GL
messages is very slow on Windows and uses up to 20% CPU usage in some
workloads due to lock contention and false broadcasts.
Using per-message event handles reduces the CPU usage to negligible
amounts despite having to allocate a new event handle for each
message.
Implement the prepare and check functions according to the
documentation by returning TRUE when events should be dispatched
via the dispatch function.
As wl_display_read_events never blocks we can call it unconditionally
without looking at the poll status.
This simplifies the implementation and gets rid of a race where the
mainloop could get blocked due to nobody actually reading the events
from the wayland connection.
We're creating buffers with one sample here for some reason. The
actual value of the segment stop is irrelevant for what we're testing
here, so lower it to 10ms so that we create fewer buffers which speeds
things up on slow machines and in valgrind.
The ->skip_buffer implementation in videoaggregator replicates
the behaviour of the aggregate method to determine whether a
buffer can be skipped
(https://bugzilla.gnome.org/show_bug.cgi?id=781928).
This fixes a typo that made it so the start time of the buffer
was calculated against the output segment, not the segment of
the relevant sinkpad, which caused buffers to be skipped when
for example a sinkpad had received a segment which base had
been modified by a pad offset somewhere along the way.
This simply makes the calculation of the buffer start time
identical to the calculation in aggregate()
Doing so involves retrieving the current viewport from OpenGL which as
with any glGet operation, is expensive.
This means that the various sinks need to reset the viewport on draw.
In the process, fix resizing on cocoa.
If we only ever make it to READY, transform_caps can create an
internal convert object that will never be freed by basetransform's
stop vmethod (PAUSED->READY).
This allows us to output audio samples without discarding
any input frames, which is useful for some formats/codecs
(e.g. the MonkeysAudio decoder implementation in ffmpeg
which will might return e.g. 16 output buffers for an
input buffer for certain files).
In the past decoder implementations just concatenated
the returned audio buffers until a full frame had been
decoded, but that's no longer possible to do efficiently
when the decoder returns audio samples in non-interleaved
layout.
Allowing subframes to be output before the entire input
frame is decoded can also be useful to decrease startup
latency/delay.
https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/49
../subprojects/gst-plugins-base/tests/check/elements/audiorate.c(192): warning C4047
Meaningful validation at that point seems to checking output GstAudioFormat
of gst_audio_format_from_string()
The use of mediump as a specifier in GLSL shaders will have limited
resolution and when used as texture coordinates may become inaccurate
over texture sizes of 1024.
This will only duplicate buffers if the gap between two consecutive
buffers is up to fill-until nsec. If it's larger, it will only output
the new buffer and mark it as discont.
New casts to avoid the the warnings mentioned below. While at it, move
some existing casts (introduced at 61bc909189) to use
GPOINTER_TO_INT too.
[458/673] Compiling C object 'tests/check/7d01337@@libs_video@exe/libs_video.c.obj'.
../tests/check/libs/video.c: In function 'fourcc_get_size':
../tests/check/libs/video.c:160:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
return (unsigned long) p->endptr;
^
In file included from ../tests/check/libs/video.c:32:
../tests/check/libs/video.c: In function 'test_video_formats':
../tests/check/libs/video.c:563:39: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
fail_unless_equals_int (size, (unsigned long) paintinfo.endptr);
^
And more.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/94