Gilbok Lee [Mon, 6 Jan 2025 02:02:21 +0000 (11:02 +0900)]
Merge branch 'upstream/1.24.10' into tizen_gst_1.24.10
Change-Id: I913bfe3f95a197a96283ab35506a437d04871357
Gilbok Lee [Tue, 24 Dec 2024 02:03:06 +0000 (11:03 +0900)]
Merge branch 'upstream/1.24.9' into tizen_gst_1.24.9
Change-Id: I20e783a9005d385a154a2e166ad9721c29a92e4a
Tim-Philipp Müller [Tue, 3 Dec 2024 23:29:07 +0000 (23:29 +0000)]
Release 1.24.10
Sebastian Dröge [Thu, 26 Sep 2024 21:31:36 +0000 (00:31 +0300)]
qtdemux: Add size check for parsing SMI / SEQH atom
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-244
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3853
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Thu, 26 Sep 2024 16:16:19 +0000 (19:16 +0300)]
qtdemux: Check for invalid atom length when extracting Closed Caption data
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-243
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3849
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Fri, 27 Sep 2024 07:39:30 +0000 (10:39 +0300)]
qtdemux: Actually handle errors returns from various functions instead of ignoring them
Ignoring them might cause the element to continue as if all is fine despite the
internal state being inconsistent. This can lead to all kinds of follow-up
issues, including memory safety issues.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-245
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3847
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Fri, 27 Sep 2024 07:38:50 +0000 (10:38 +0300)]
qtdemux: Make sure there are enough offsets to read when parsing samples
While this specific case is also caught when initializing co_chunk, the error
is ignored in various places and calling into the function would lead to out of
bounds reads if the error message doesn't cause the pipeline to be shut down
fast enough.
To avoid this, no matter what, make sure enough offsets are available when
parsing them. While this is potentially slower, the same is already done in the
non-chunks_are_samples case.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-245
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3847
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Fri, 27 Sep 2024 06:47:50 +0000 (09:47 +0300)]
qtdemux: Fix error handling when parsing cenc sample groups fails
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-238, GHSL-2024-239, GHSL-2024-240
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3846
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Thu, 26 Sep 2024 21:12:57 +0000 (00:12 +0300)]
qtdemux: Fix length checks and offsets in stsd entry parsing
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-242
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3845
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Thu, 26 Sep 2024 11:17:02 +0000 (14:17 +0300)]
qtdemux: Make sure enough data is available before reading wave header node
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-236
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3843
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Thu, 26 Sep 2024 06:20:28 +0000 (09:20 +0300)]
qtdemux: Make sure only an even number of bytes is processed when handling CEA608 data
An odd number of bytes would lead to out of bound reads and writes, and doesn't
make any sense as CEA608 comes in byte pairs.
Strip off any leftover bytes and assume everything before that is valid.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-195
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3841
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Fri, 27 Sep 2024 12:50:54 +0000 (15:50 +0300)]
qtdemux: Check sizes of stsc/stco/stts before trying to merge entries
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-246
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3854
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Thu, 26 Sep 2024 15:41:39 +0000 (18:41 +0300)]
qtdemux: Don't iterate over all trun entries if none of the flags are set
Nothing would be printed anyway.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Sebastian Dröge [Thu, 26 Sep 2024 15:40:56 +0000 (18:40 +0300)]
qtdemux: Fix debug output during trun parsing
Various integers are unsigned so print them as such. Also print the actual
allocation size if allocation fails, not only parts of it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Antonio Morales [Thu, 26 Sep 2024 15:39:37 +0000 (18:39 +0300)]
qtdemux: Fix integer overflow when allocating the samples table for fragmented MP4
This can lead to out of bounds writes and NULL pointer dereferences.
Fixes GHSL-2024-094, GHSL-2024-237, GHSL-2024-241
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3839
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8060>
Stéphane Cerveau [Wed, 9 Oct 2024 17:47:41 +0000 (13:47 -0400)]
h265parser/bitwriter: add some comments for ceil_log2 use
Validate that the length of field must be calculate with
ceil_logs2 and not bit storage.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7905>
Stéphane Cerveau [Wed, 9 Oct 2024 17:46:17 +0000 (13:46 -0400)]
h264parse: use of ceil_log2 instead of bit_storage
According to the specification:
The length of the slice_group_id[ i ] syntax element is Ceil( Log2(
num_slice_groups_minus1 + 1 ) ) bits
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7905>
Stéphane Cerveau [Fri, 30 Aug 2024 11:21:30 +0000 (13:21 +0200)]
utils: improve gst_util_ceil_log2
According to the following comparison of algorithms, the value
for 0 and 1 was giving an incorrect result.
https://gist.github.com/ceyusa/
6061b33ac109a68bcd222f6919968c9a
More information here:
https://github.com/rofrol/codeforces/blob/master/ceil_log2.c
Use a different algorithm which offers better result and keep the
performance.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7905>
Sebastian Dröge [Wed, 9 Oct 2024 15:52:52 +0000 (11:52 -0400)]
matroskademux: Put a copy of the codec data into the A_MS/ACM caps
The original codec data buffer is owned by matroskademux and does not
necessarily live as long as the caps.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-280
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3894
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8058>
Sebastian Dröge [Mon, 30 Sep 2024 16:19:42 +0000 (19:19 +0300)]
matroskademux: Skip over zero-sized Xiph stream headers
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-251
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3867
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8058>
Sebastian Dröge [Mon, 30 Sep 2024 16:06:03 +0000 (19:06 +0300)]
matroskademux: Skip over laces directly when postprocessing the frame fails
Otherwise NULL buffers might be handled afterwards.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-249
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3865
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8058>
Sebastian Dröge [Mon, 30 Sep 2024 16:04:51 +0000 (19:04 +0300)]
matroskademux: Don't take data out of an empty adapter when processing WavPack frames
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-249
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3865
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8058>
Sebastian Dröge [Mon, 30 Sep 2024 15:25:53 +0000 (18:25 +0300)]
matroskademux: Check for big enough WavPack codec private data before accessing it
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-250
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3866
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8058>
Sebastian Dröge [Mon, 30 Sep 2024 13:33:39 +0000 (16:33 +0300)]
matroskademux: Fix off-by-one when parsing multi-channel WavPack
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8058>
Sebastian Dröge [Mon, 30 Sep 2024 13:32:48 +0000 (16:32 +0300)]
matroskademux: Only unmap GstMapInfo in WavPack header extraction error paths if previously mapped
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-197
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3863
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8058>
Sebastian Dröge [Fri, 4 Oct 2024 11:04:03 +0000 (14:04 +0300)]
avisubtitle: Fix size checks and avoid overflows when checking sizes
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-262
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3890
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8055>
Sebastian Dröge [Fri, 4 Oct 2024 10:51:00 +0000 (13:51 +0300)]
wavparse: Check size before reading ds64 chunk
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-261
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3889
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8054>
Sebastian Dröge [Fri, 4 Oct 2024 10:27:27 +0000 (13:27 +0300)]
wavparse: Fix clipping of size to the file size
The size does not include the 8 bytes tag and length, so an additional 8 bytes
must be removed here. 8 bytes are always available at this point because
otherwise the parsing of the tag and length right above would've failed.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-260
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3888
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8054>
Sebastian Dröge [Fri, 4 Oct 2024 10:22:02 +0000 (13:22 +0300)]
wavparse: Check that at least 32 bytes are available before parsing smpl chunks
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-259
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3887
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8054>
Sebastian Dröge [Fri, 4 Oct 2024 10:21:44 +0000 (13:21 +0300)]
wavparse: Check that at least 4 bytes are available before parsing cue chunks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8054>
Sebastian Dröge [Fri, 4 Oct 2024 10:15:27 +0000 (13:15 +0300)]
wavparse: Fix parsing of acid chunk
Simply casting the bytes to a struct can lead to crashes because of unaligned
reads, and is also missing the endianness swapping that is necessary on big
endian architectures.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8054>
Sebastian Dröge [Fri, 4 Oct 2024 10:09:43 +0000 (13:09 +0300)]
wavparse: Make sure enough data for the tag list tag is available before parsing
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-258
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3886
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8054>
Sebastian Dröge [Fri, 4 Oct 2024 10:00:57 +0000 (13:00 +0300)]
wavparse: Check for short reads when parsing headers in pull mode
And also return the actual flow return to the caller instead of always returning
GST_FLOW_ERROR.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-258, GHSL-2024-260
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3886
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3888
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8054>
Sebastian Dröge [Wed, 2 Oct 2024 11:44:21 +0000 (14:44 +0300)]
gdkpixbufdec: Check if initializing the video info actually succeeded
Otherwise a 0-byte buffer would be allocated, which gives NULL memory when
mapped.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-118
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3876
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8053>
Mathieu Duponchelle [Wed, 2 Oct 2024 14:52:51 +0000 (16:52 +0200)]
oggstream: review and fix per-format min_packet_size
This addresses all manually detected invalid reads in setup functions.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8050>
Mathieu Duponchelle [Wed, 2 Oct 2024 13:16:30 +0000 (15:16 +0200)]
vorbis_parse: check writes to GstOggStream.vorbis_mode_sizes
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-117 Fixes gstreamer#3875
Also perform out-of-bounds check for accesses to op->packet
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8050>
Sebastian Dröge [Mon, 30 Sep 2024 15:19:30 +0000 (18:19 +0300)]
discoverer: Don't print channel layout for more than 64 channels
64+ channels are always unpositioned / unknown layout.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-248
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3864
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8046>
Sebastian Dröge [Mon, 30 Sep 2024 13:22:19 +0000 (16:22 +0300)]
jpegdec: Directly error out on negotiation failures
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-247
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3862
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8052>
Sebastian Dröge [Wed, 9 Oct 2024 15:23:47 +0000 (11:23 -0400)]
subparse: Check for NULL return of strchr() when parsing LRC subtitles
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-263
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3892
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8051>
Sebastian Dröge [Tue, 1 Oct 2024 10:22:50 +0000 (13:22 +0300)]
opusdec: Set at most 64 channels to NONE position
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-116
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3871
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8049>
Sebastian Dröge [Mon, 30 Sep 2024 15:36:19 +0000 (18:36 +0300)]
ssaparse: Don't use strstr() on strings that are potentially not NULL-terminated
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8048>
Sebastian Dröge [Mon, 30 Sep 2024 18:40:44 +0000 (21:40 +0300)]
ssaparse: Search for closing brace after opening brace
Otherwise removing anything between the braces leads to out of bound writes if
there is a closing brace before the first opening brace.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-228
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3870
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8048>
Sebastian Dröge [Mon, 30 Sep 2024 18:35:07 +0000 (21:35 +0300)]
vorbisdec: Set at most 64 channels to NONE position
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-115
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3869
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8047>
Sebastian Dröge [Thu, 26 Sep 2024 10:43:06 +0000 (13:43 +0300)]
id3v2: Don't try parsing extended header if not enough data is available
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-235
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3842
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8045>
Sebastian Dröge [Thu, 26 Sep 2024 19:16:06 +0000 (22:16 +0300)]
qtdemux: Avoid integer overflow when parsing Theora extension
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-166
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3851
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8044>
Sebastian Dröge [Thu, 26 Sep 2024 19:07:22 +0000 (22:07 +0300)]
allocator: Avoid integer overflow when allocating sysmem
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-166
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3851
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8044>
Nicolas Dufresne [Fri, 29 Nov 2024 18:41:54 +0000 (13:41 -0500)]
level: Fix integer overflow when filling LevelMeta
The level in GstAudioLevelMeta is represented as a signed 8bit value from 0 to
127 (with 127 meaning silence). When converting from double, make sure to clip
the value, this also prevent integer overflow in the conversion. This fixes an
issue where a lower then -127db is reported and random level with near silent
streams (due to integer overflow).
Fixes #4068
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8029>
Pablo Sun [Mon, 2 Dec 2024 11:34:14 +0000 (19:34 +0800)]
kmssink: Add mediatek auto-detection
Add MediaTek display controller into list of
auto-detected modules.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8027>
Philippe Normand [Fri, 29 Nov 2024 17:33:29 +0000 (17:33 +0000)]
rtp: Fix precision loss in gst_rtcp_ntp_to_unix()
Without this patch the UNIX timestamp resulting from the translation from NTP
would be off by one nano-second.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8022>
Sebastian Dröge [Thu, 28 Nov 2024 14:06:17 +0000 (16:06 +0200)]
systemclock: Don't keep the clock entry locked while getting the time from the clock
gst_clock_get_time() will take the clock mutex, which would then result in a lock
order violation and possible deadlocks. If both mutexes are to be locked, the
clock must always be locked first.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8019>
Sebastian Dröge [Thu, 28 Nov 2024 13:49:24 +0000 (15:49 +0200)]
systemclock: Get rid of conditional unlocking of the clock entries
At every point it is known whether the entry needs to be unlocked or not.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8019>
Sebastian Dröge [Thu, 28 Nov 2024 13:43:08 +0000 (15:43 +0200)]
systemclock: Remove confusing conditional unlock
At this point the entry is always locked and needs to be unlocked.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8019>
Sebastian Dröge [Thu, 28 Nov 2024 13:25:47 +0000 (15:25 +0200)]
systemclock: Use a flag while waiting for the async thread to start
Otherwise there can be spurious wakeups.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8019>
Sebastian Dröge [Sun, 1 Dec 2024 09:45:34 +0000 (11:45 +0200)]
mxfmux: Fix off-by-one in the month when generating a timestamp for now
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8018>
Sebastian Dröge [Thu, 28 Nov 2024 10:56:33 +0000 (12:56 +0200)]
shout2send: Unref event at the end of the event function
The function takes ownership of it and should get rid of it at the end.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8006>
Sebastian Dröge [Wed, 3 Apr 2024 12:01:52 +0000 (15:01 +0300)]
rtspsrc: Optionally timestamp RTP packets with their receive times in TCP/HTTP mode
Until https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6509
this was accidentally done inside rtpjitterbuffer for many years, and
doing so potentially solves problems on some streams while introducing
problems on others.
Make this configurable on rtspsrc and default to not set timestamps.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8004>
Alicia Boya García [Wed, 9 Oct 2024 17:35:33 +0000 (13:35 -0400)]
pad: Never push sticky events in response to a FLUSH_STOP
FLUSH_STOP is meant to clear the flushing state of pads and elements
downstream, not to process data. Hence, a FLUSH_STOP should not
propagate sticky events. This is also consistent with how flushes are a
special case for probes.
Currently this is almost always the case, since a FLUSH_STOP is
__usually__ preceded by a FLUSH_START, and events (sticky or not) are
discarded while a pad has the FLUSHING flag active (set by FLUSH_START).
However, it is currently assumed that a FLUSH_STOP not preceded by a
FLUSH_START is correct behavior, and this will occur while autoplugging
pipelines are constructed. This leaves us with an unhandled edge case!
This patch explicitly disables sending sticky events when pushing a
FLUSH_STOP, instead of relying on the flushing flag of the pad, which
will break in the edge case of a FLUSH_STOP not preceded by a
FLUSH_START.
If sticky events are propagated in response to a FLUSH_STOP, the
flushing thread can end up deadlocked in blocking code of a downstream
pad, such as a blocking probe. Instead, those events should be
propagated from the streaming thread of the pad when handling a
non-flushing synchronized event or buffer.
This fixes a deadlock found in WebKit with playbin3 when seeks occur
before preroll, where the seeking thread ended up stuck in the blocking
probe of playsink:
https://github.com/WebPlatformForEmbedded/WPEWebKit/issues/1367
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8003>
wbartel [Wed, 27 Nov 2024 10:19:02 +0000 (11:19 +0100)]
gstreamer: prefix debug dot node names to prevent splitting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7998>
Sebastian Dröge [Mon, 25 Nov 2024 10:27:03 +0000 (12:27 +0200)]
streamsynchronizer: Only send GAP events out of source pads
If streamsynchronizer is waiting on the stream's sinkpad and srcpad at the same
time, it can happen that the GAP event is otherwise sent out of the sinkpad,
which is in the wrong direction.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7997>
Tim-Philipp Müller [Wed, 27 Nov 2024 19:39:53 +0000 (19:39 +0000)]
ci: docker: use cargo install --locked for cargo-c installation
Backported from commit
2263caff
Should fix the following error on image regeneration:
package `cargo-util v0.2.15` cannot be built because it requires rustc 1.80
or newer, while the currently active rustc version is 1.76.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7989>
hjkim [Wed, 27 Nov 2024 01:18:33 +0000 (10:18 +0900)]
Fix build error due to upgrade to ffmpeg 7.1
All patches are from gst-libav-1.24.9
Change-Id: I02fdb4e79ad3a5a47948a67f1164a763dcc41b42
Sebastian Dröge [Tue, 26 Nov 2024 13:20:45 +0000 (15:20 +0200)]
discoverer: Also copy missing element details when copying a GstDiscovererInfo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7986>
Sebastian Dröge [Tue, 26 Nov 2024 13:41:24 +0000 (15:41 +0200)]
discoverer: Make sure the missing elements details array is NULL-terminated in a thread-safe way
And also avoid a possible out-of-bounds read if the array contains no elements.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7986>
Thibault Saunier [Mon, 28 Oct 2024 15:38:39 +0000 (12:38 -0300)]
discoverer: Fix typos
discovererd / discoverered -> discovered
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7986>
Jonas Rebmann [Wed, 27 Nov 2024 11:16:37 +0000 (12:16 +0100)]
v4l2videodec: fix freeze race condition
This fixes a possible deadlock between gst_v4l2_video_dec_change_state
and gst_v4l2_video_dec_loop on the buffer pool.
When stopping capture, the flushing state of the v4l2 capture buffer
pool gets reverted in the processing loop after it was set via
gst_v4l2_object_unlock (self->v4l2capture) (in
gst_v4l2_video_dec_change_state). As a result, gst_v4l2_video_dec_loop
does not return and consequently, gst_pad_stop_task gets stuck waiting
for the GST_PAD_STREAM_LOCK. To circumvent this, skip acquiring the
buffer pool if stopping capture.
Suggested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7987>
Xi Ruoyao [Tue, 26 Nov 2024 13:34:25 +0000 (21:34 +0800)]
x265: Allow building with x265-4.1
In x265-4.1 masteringDisplayColorVolume is changed from a pointer to a
character array embedded in struct x265_param.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7983>
Nirbheek Chauhan [Tue, 26 Nov 2024 11:22:05 +0000 (16:52 +0530)]
meson: Don't unconditionally invoke the libsoup subproject
fallback: kwarg will invoke the specified subproject even if required:
false, which is not what we want here.
Reported at https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4045#note_2674340
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7982>
Albert Sjolund [Tue, 26 Nov 2024 08:23:51 +0000 (09:23 +0100)]
webrtc: don't crash on invalid bundle id
If the bundle id forwarded to connect_rtpfunnel is not valid,
the assertion fails and crashes the program. This is now instead
an error.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7966>
Tomáš Polomský [Tue, 26 Nov 2024 05:40:34 +0000 (06:40 +0100)]
appsink: fix timeout logic for gst_app_sink_try_pull_sample
In case of gst_app_sink_try_pull_object returns an object instead of a sample,
the whole process must be restarted with the reduced timeout, otherwise requested
timeout could be easily exceeded.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7980>
Matthew Waters [Fri, 22 Nov 2024 07:59:53 +0000 (18:59 +1100)]
qt(6)/material: ensure that we always update the context in setBuffer()
Scenario is that there are two (or more) GstGLContext's wrapping Qt's GL
context from either multiple qml(6)glsink or qml(6)glsrc elements. Call flow is this:
1. material 1 setBuffer()
2. material 1 bind()
3. material 2 setBuffer()
4. material 2 bind()
If the call to setBuffer() reuses the same buffer as previous call, then the
qt context is not updated in the material. If however the previously used qt
context by the material had been deactivated or freed, then bind() would fail
and could result in a critical like so:
gst_gl_context_thread_add: assertion 'context->priv->active_thread == g_thread_self ()' failed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7978>
Jan Alexander Steffens (heftig) [Tue, 19 Nov 2024 16:21:16 +0000 (17:21 +0100)]
ccutils: Fix a typo in cc_buffer_take_cea608_field2
There are no users of cc_buffer_take_cea608_field2, so this never was a
problem.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7973>
Jan Alexander Steffens (heftig) [Tue, 19 Nov 2024 15:42:11 +0000 (16:42 +0100)]
ccutils: Fix a typo in max_buffer_time handling
All users set max_buffer_time to GST_CLOCK_TIME_NONE, effectively
infinite, so this never was a problem.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7973>
Jan Alexander Steffens (heftig) [Tue, 19 Nov 2024 12:47:55 +0000 (13:47 +0100)]
ccutils: Remove broken branch
This branch was added in
dd00dab5e9e8650f3f00660c2e611f81f1e8cd5b but is
never actually taken, as it requires `cc_data` to be null but
`cc_data_len` to be non-null. It would then dereference the null
`cc_data`.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7973>
Tomáš Polomský [Mon, 25 Nov 2024 14:47:22 +0000 (15:47 +0100)]
v4l2object: Fixed incorrect maximum value for int range
There are objects where maximum is not multiplication of the step,
e.g. there was a combination where max was 65535 with step 2.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7961>
wbartel [Mon, 25 Nov 2024 15:28:51 +0000 (16:28 +0100)]
tracers: unlock leaks tracer if already tracking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7960>
Sebastian Dröge [Mon, 25 Nov 2024 12:25:52 +0000 (14:25 +0200)]
splitmuxsrc: Convert part reader to a bin with a non-async bus
A pipeline always has an async bus, which involves allocating an fd pair. As
splitmuxsrc only uses the bus' sync handler, this is not required and can easily
cause splitmuxsrc to exceed the fd limit for no good reason.
The other features of GstPipeline are also not needed here, e.g. clock selection.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7957>
Edward Hervey [Fri, 22 Nov 2024 10:50:05 +0000 (11:50 +0100)]
decodebin3: Unify collection switching checks
We only want to switch to a selection of an output collection if all streams are
present.
This was previously only done in one place (when triggering by new incoming
streams) but not when triggered by user/application.
Avoid this by moving the check to handle_stream_switch()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7956>
Seungmin Kim [Wed, 12 Jun 2024 15:09:20 +0000 (15:09 +0000)]
meson: Fix libva.wrap meson build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7955>
Andoni Morales Alastruey [Wed, 20 Nov 2024 12:32:20 +0000 (13:32 +0100)]
discoverer: fix segfault in race condition adding a new uri's
There is a race condition adding new uri's right after receiving
the `discovered` event. We must wait until we have cleaned-up
the last discovery to start processing the new one
Fix #3758
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7934>
Nirbheek Chauhan [Tue, 19 Nov 2024 22:53:32 +0000 (04:23 +0530)]
meson: Don't use libdrm_dep in cc.has_header()
It can't handle subproject dependencies. Pointed out in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4033#note_2665974
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7932>
Philippe Normand [Thu, 10 Oct 2024 19:51:36 +0000 (15:51 -0400)]
sdp: Add debug categories for message and mikey modules
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7926>
Guillaume Desmottes [Mon, 18 Nov 2024 14:09:43 +0000 (15:09 +0100)]
libav: avviddec: log the old resolution when updating the pool
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7925>
Guillaume Desmottes [Fri, 15 Nov 2024 10:34:07 +0000 (11:34 +0100)]
libav: viddec: provide details if meta has the wrong resolution
Will produce a more useful assert error message.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7925>
Guillaume Desmottes [Tue, 19 Nov 2024 10:54:12 +0000 (11:54 +0100)]
Revert "avviddec: Unlock video decoder stream lock temporarily while finishing frames"
This reverts commit
6b18f0233900ae4ecdbcde0ce76ab55fd85286f4.
This commit introduced a regression, see
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4032
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7921>
Gilbok Lee [Tue, 19 Nov 2024 03:34:52 +0000 (12:34 +0900)]
jpegparse: Change plugin rank GST_RANK_NONE to GST_RANK_SECONDARY
- In order to use v4l2jpegdec, plugin need a parsed:true caps.
During autoplugin, it is GST_RANK_NONE, so parsebin can't find
jpegparse and therefore can't use v4l2jpegdec
- Increase the rank of the jpegparse plugin to use v4l2jpegdec
Change-Id: Icd89c177836580d91d0b730e31731cc8b383c23a
Robert Rosengren [Mon, 18 Nov 2024 07:47:12 +0000 (08:47 +0100)]
gstdeviceprovider: fix leaking hidden providers
Free list of hidden providers upon stop and dispose.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7915>
Albert Sjolund [Fri, 15 Nov 2024 10:44:17 +0000 (11:44 +0100)]
rtpmanager: don't map READWRITE in twcc header ext
There is no need to map the buffer as writable, as there is
only a read performed on the mapped buffer. This is in line
with other header extensions, as no other extensions maps
it as readwrite.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7910>
Philippe Normand [Sat, 16 Nov 2024 18:24:23 +0000 (18:24 +0000)]
playbackutils: Fix caps leak in get_n_common_capsfeatures()
The gst_static_caps_get() return value is transfer-full.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7909>
Nicolas Dufresne [Thu, 14 Nov 2024 20:15:43 +0000 (15:15 -0500)]
glupload: Upgrade uploader selection message to INFO
This allow using INFO log to quickly see what uploader we
picked. This is very useful as the DEBUG category has became
very noisy.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7907>
Nicolas Dufresne [Thu, 14 Nov 2024 20:13:50 +0000 (15:13 -0500)]
glupload: dmabuf: Fix emulated tiled import
The added check for LINEAR modifier broke dmabuf import for
NV12 emulation (R8/RG88) of all sort (linear and tiled).
Fixes !5461
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7907>
Sebastian Dröge [Thu, 14 Nov 2024 13:58:58 +0000 (15:58 +0200)]
audiostreamalign: Don't report disconts for every buffer if alignment-threshold is too small
If it is too small, the maximum allowed diff becomes 0 samples which would then
trigger if there is no discontinuity at all.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7906>
Jan Alexander Steffens (heftig) [Thu, 1 Jul 2021 11:09:04 +0000 (13:09 +0200)]
mpegtsmux: Mux timestampless buffers immediately
Instead of leaving them queued indefinitely, or until we're timing out
and it's the only buffer queued.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7901>
Sebastian Dröge [Tue, 12 Nov 2024 09:01:03 +0000 (11:01 +0200)]
mpegtsmux: Don't time out in live mode if no timestamped next buffer is available
The muxer can only advance the time if it has a timestamped buffer that can be
output, otherwise it will just busy-wait and use up a lot of CPU.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3912
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7901>
Jan Alexander Steffens (heftig) [Mon, 21 Sep 2020 14:48:38 +0000 (16:48 +0200)]
flvmux: Mux timestampless buffers immediately
Instead of leaving them queued indefinitely, or until we're timing out
and it's the only buffer queued.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7902>
Sebastian Dröge [Tue, 12 Nov 2024 09:25:38 +0000 (11:25 +0200)]
flvmux: Don't time out in live mode if no timestamped next buffer is available
But also don't wait for a buffer on both pads, which might take forever in case
of gaps in one of the streams.
The muxer can only advance the time if it has a timestamped buffer that can be
output, otherwise it will just busy-wait and use up a lot of CPU.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7902>
Robert Rosengren [Wed, 13 Nov 2024 14:49:57 +0000 (15:49 +0100)]
udpsrc: protect cancellable from unlock/unlock_stop race
Protect cancellable from simultaneous unlock and unlock_stop calls from
basesrc class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7897>
Edward Hervey [Fri, 15 Nov 2024 08:16:56 +0000 (09:16 +0100)]
ci: Don't use a massive image for the cerbero trigger
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4024
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7896>
Théo Maillart [Tue, 5 Nov 2024 13:34:03 +0000 (14:34 +0100)]
mpegvideoparse: do not set delta unit flag on unknown frame type
When encoding an image to mpeg2 video, with something like:
gst-launch-1.0 encodebin name=e profile=mpegpsmux:video/mpeg,mpegversion=2,systemstream=false ! \
filesink location=sample.mpg filesrc num-buffers=1 blocksize=$(stat -c%s sample.png) \
location=sample/dts.png ! pngdec ! e.
The only frame's type is set to an invalid value 0
The consequence is that mpegvideoparse sets the delta unit flag on the buffer because
it is not an I frame, then decodebin3 drops this only frame because the delta
unit flag is set and the decoder receives eos before it was able to receive any
encoded data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7876>
Taruntej Kanakamalla [Thu, 7 Nov 2024 10:14:25 +0000 (15:44 +0530)]
ptp: use ip_mreq instead of ip_mreqn for macOS
To join a multicast the macOS still uses the interface address
from the ip_mreq instead of the ip_mreqn unlike other Linux systems.
So add a new conditional block for macOS to use ip_mreq for IP_ADD_MEMBERSHIP
and ip_mreqn for IP_MULTICAST_IF
This is similar to the fix in the glib for multicast join/leave
operation on macOS
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4333
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7864>
Sebastian Dröge [Tue, 17 Sep 2024 08:47:47 +0000 (11:47 +0300)]
ccconverter: Don't override in_fps_entry when trying to take output
This allows to handle CDP streams where the framerate is not provided by the
caps and generally gives preference to the framerate inside the CDP packets over
the one in the caps.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7862>