| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a race condition in gsttagdemux.c between typefinding and the
end-of-stream event. If TYPE_FIND_MAX_SIZE is exceeded,
demux->priv->collect is set to NULL and an error is returned. However,
the end-of-stream event causes one last attempt at typefinding to occur.
This leads to gst_tag_demux_trim_buffer() being called with the NULL
demux->priv->collect buffer which it attempts to dereference, resulting
in a segfault.
The malicious MP3 can be created by:
printf "\x49\x44\x33\x04\x00\x00\x00\x00\x00\x00%s", \
"$(dd if=/dev/urandom bs=1K count=200)" > malicious.mp3
This creates a valid ID3 header which gets us as far as typefinding. The
crash can then be reproduced with the following pipeline:
gst-launch-1.0 -e filesrc location=malicious.mp3 ! queue ! decodebin ! audioconvert ! vorbisenc ! oggmux ! filesink location=malicious.ogg
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/959
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1295>
|
|
|
|
|
|
| |
Similar to ae8d0cf3acfaf79d8479647a55bd44b8453d07df
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1294>
|
|
|
|
|
|
|
|
|
|
|
| |
Scale down the matrix before calculating RGB -> YUV matrix
otherwise offset values will be wrong
Fixing pipeline
videotestsrc ! video/x-raw,format=ARGB ! videoconvert gamma-mode=remap ! \
video/x-raw,format=P010_10LE,colorimetry="bt2020"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1293>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1292>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1292>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There may be two or more threads involved here however the important
interaction is the use of ogg->seeK_event_drop_till value that was only
set in the push-mode seek-event thread and could race with upstream
sending e.g. and EOS (or data).
Scenario is this:
1. oggdemux performs a seek to near the end of the file to try and find
the duration. ogg->push_state is set to PUSH_DURATION.
2. Seek is picked up by the dedicated seek event thread and sets
ogg->seek_event_drop_till to the seek event's seqnum.
3. Most operations are blocked or dropped waiting on the duration to
be determined and processing continues until a duration is found.
4. Two branching options for how this ultimately plays out
4a. The source is too fast and we receive an EOS event which is dropped
because ogg->push_state == PUSH_DURATION. In this case everything
works.
4b. We hit our 'almost at the end' check in
gst_ogg_pad_handle_push_mode_state() and attempt to seek back to the
beginning (or to a user-provided seek). This seek is marshalled to
the seek event thread without setting ogg->seek_event_drop_till but
with change ogg->push_state = PUSH_PLAYING. If an EOS event or
e.g. buffers arrive from upstream before the seek event thread has
picked up the seek event, then the EOS/data is processed as if it
came as a result of the seek event. This is the case that fails.
The fix is two-fold:
1. Preemptively set ogg->seek_event_drop_till when setting the seek
event so that data and other events can be dropped correctly.
2. In addition to dropping and EOS events while ogg->push_state ==
PUSH_DURATION, also drop any EOS events that are received before the
seek event has been processed by also tracking the seqnum of the seek.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1291>
|
|
|
|
|
|
| |
Don't pass non-GstObject object to there.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1290>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes we can't output anything because we don't have enough
incoming frames. In that case, the resampler was trying to call
do_quantize() and do_resample() in a loop forever because there would
never be samples to output (so chain->samples would always be NULL).
Fix this by not calling chain->make_func() in a loop -- seems
completely unnecessary since calling it over and over won't change
anything if the make_func() can't output samples.
Also add some checks for the input and / or output being NULL when
doing conversion or quantization. This will happen when we have
nothing to output.
We can't bail early, because we need resampler->samples_avail to be
updated in gst_audio_resampler_resample(), so we must call that and
no-op everything along the way.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1289>
|
|
|
|
|
|
|
|
| |
Add missing header.
From Claes Nästén via http://gnats.netbsd.org/56509
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1288>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a potential race condition with this sort of pipelines on
certain systems (depends on the processing load):
GST_DEBUG_DUMP_DOT_DIR=/tmp \
gst-launch-1.0 uridecodebin3 uri=file://stream.mp4 ! glupload ! \
glimagesink --gst-debug=*:4
Right after the pipeline passes from PAUSED to READY, bin_to_dot_file
dumps uridecodebin3 properties, but current uri and suburi might be
already freed, causing a potential use-after-freed.
This patch makes NULL the current item right after all the play items
are freed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1287>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes the resampler has enough space to store all the incoming
samples without outputting anything. When this happens,
gst_audio_resampler_get_out_frames() returns 0.
In that case, the resampler should consume samples and just return.
Otherwise, we get a segfault when gst_audio_resampler_resample() tries
to resample into a NULL 'out' pointer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1286>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Retrieving the pad template caps from a ghost pad returns ANY which when
merged with any other caps will return ANY. ANY is not very specific
and may cause suboptimal code paths in e.g. decoders that assume the
lowest common denominator when presented with ANY caps.
Fixes negotiating dma-buf with vaapidecodebin between glupload in the
video sink element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1284>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improvements to uridecodebin3 and urisourcebin so that they are
reusable across a PAUSED->READY->PAUSED transition.
Disconnect and release decodebin3 request pads when urisourcebin
removes src pads.
In urisourcebin, make sure to remove src pads that are exposed
directly (raw pads and static typefind srcpads) when
cleaning up.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/768
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1283>
|
|
|
|
|
|
|
|
| |
In case we already have a pad but more might be added later we were
ignoring the new pads added later, we should track the element
new pads and expose them as they are added.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1285>
|
|
|
|
|
|
|
|
|
|
|
|
| |
After sending or retrieving data, gstrtspconnection resets the socket's
timeout to 0 (infinite). This could cause problems if sending and
receiving at the same time. For example, if RTCP data is sent from the
streaming thread while gstrtspsrc is already retrieving data.
With this patch, timeout is only reset to 0 if there is no other
thread using the socket.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1282>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the following build failure with gcc 4.8 which has been added with
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/d268c193ad39fb970351ed62898be806ebd0a71e:
../gst-libs/gst/video/gstvideoaggregator.c: In function 'gst_video_aggregator_init':
../gst-libs/gst/video/gstvideoaggregator.c:2762:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (gint i = 0; i < gst_caps_get_size (src_template); i++) {
^
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1281>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The users of this API need to be able to differentiate between EINTR
and ERROR. For example, in rtspsrc, gst_rtsp_conninfo_connect()
behaves differently when gst_rtsp_connection_connect_with_response_usec()
returns an ERROR or EINTR. The former is an element error while the
latter is simple a GST_ERROR since it was a user cancellation of the
connection attempt.
Due to this, rtspsrc was incorrectly emitting element errors while
going to NULL, which would or would not reach the application in
a racy manner.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1271>
|
|
|
|
|
|
|
|
| |
Without this, glimagesink since wayland 727c7903 fails with
gst-launch-1.0: ../src/wayland-client.c:2181: wl_proxy_set_queue:
Assertion 'proxy->display == queue->display' failed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1247>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
resyncing
If a buffer is dropped during resyncing on a discont because either its
end offset is already before the current output offset of the
aggregator or because it fully overlaps with the part of the current
output buffer that was already filled, then don't just assume that the
next buffer is going to start at exactly the expected offset. It might
still require some more dropping of samples.
This caused the input to be mixed with an offset to its actual position
in the output stream, causing additional latency and wrong
synchronization between the different input streams.
Instead consider each buffer after a discont as a discont until the
aggregator actually resynced and starts mixing samples from the input
again.
Also update the start output offset of a new input buffer if samples
have to be dropped at the beginning. Otherwise it might be mixed too
early into the output and overwrite part of the output buffer that
already took samples from this input into account.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/912
which is a regression introduced by https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1180/
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1228>
|
|
|
|
|
|
|
|
|
|
| |
When the video converter is using multiple threads, the gamma tables
were created multiple times, leaking the tables set up for the previous
thread.
Only calculate the tables once.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1217>
|
|
|
|
|
|
| |
The config got leaked when parameter validation fails.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1217>
|
|
|
|
|
|
|
|
| |
When configuring a multi-thread converter, only allocate the
shared colour conversion matrices once for the first thread,
to avoid allocating multiple times and leaking memory.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1220>
|
|
|
|
|
|
|
|
| |
An IPv6 address must be specified within [] brackets.
Add brackets for IPv6 address used for tunneled mode,
for non-tunneled this is already supported.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1214>
|
|
|
|
|
|
| |
Add missing "return;" which prevents double lock release.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1210>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1186>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1185>
|
|
|
|
|
|
|
| |
On re-sync, don't forget what has already been written. Instead, just
drop any samples that overlap with parts that were already filled.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1185>
|
|
|
|
|
|
|
| |
GstAudioRingBufferSpec can be cleared from other thread, then
rate value will be zero
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1183>
|
|
|
|
|
|
|
|
| |
When compiling without assertions `g_assert` and its contents disappear
resulting in no list being deserialized at all and the
`gst_{audio,video}_formats_raw` functions to return an empty collection.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1182>
|
|
|
|
|
|
|
|
|
|
| |
The full src_height/width was being used instead of the remaining
width/height for the current band. As a side effect, that value would
get erroneously reset and would cause overrun.
Fixes #887
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1163>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1135>
|
|
|
|
|
|
| |
It's already indirectly included but let's better be explicit here.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1135>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1132>
|
|
|
|
|
|
|
|
|
|
|
| |
"implicit_include_directories: false" now also means that current build
directory is not added to include paths by default any more. We have to
add it manually because we have some custom_target() that generate
headers in current build directory.
See https://github.com/mesonbuild/meson/issues/8700.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1127>
|
|
|
|
|
|
|
|
|
| |
uridecodebin assumes that refcount of decodebins stored in pending_decodebins
are floating but it might not be true in case that refcount of the decodebin
was touched in other places. To avoid the floating refcount issue,
hold strong reference.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1119>
|
|
|
|
|
|
| |
It's more debugging friendly (tracer for example)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1119>
|
|
|
|
|
|
|
|
|
|
| |
This is a direct translation of
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/429>,
as playbin{2,3} insulates its sub groups state changes from the pipeline
base class, it needs to track whether the subgroup is live itself,
and handle RESET_TIME the same way GstPipeline does.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1110>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As the comment asked, yes, incomplete writes can happen.
I have encountered this with an sshfs mount, for example.
It seems like g_output_stream_write_all() is designed to handle this case,
by not returning until the requested buffer has been completely written,
or an error occurs, which seems to match up with the desired behaviour.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/885
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1108>
|
|
|
|
|
|
|
|
|
|
| |
Like other foobarA variant APIs on Windows, formatted string
by strftime() is ANSI string, not unicode encoded one.
It would be problematic for non-english locale systems.
We should use unicode version API (wcsftime in this case)
whenever it's possible on Windows.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1107>
|
|
|
|
|
|
|
|
|
|
|
|
| |
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead. GCC 11 has started warning about using volatile
with atomic operations.
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1106>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1098>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1086>
|
|
|
|
|
|
|
|
|
|
| |
Even if we don't care about any global objects being removed, wayland
will still error if globals are removed without a corresponding listener
set up for them. e.g. wl_output hotplugging
Discovered by: Matthias Clasen
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1085>
|
|
|
|
|
|
|
| |
Add a g_free() in the code path that forwards the query to the parent
handler.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1084>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Check the right variable when checking if there's
enough data left to read the frame size.
Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/876
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1066>
|