Commit graph

116756 commits

Author SHA1 Message Date
Sebastian Dröge
0d4aeb3efd rtph264depay, rtph265depay: various parameter-set string handling fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7813>
2024-11-01 16:44:56 +00:00
Francisco Javier Velázquez-García
718ed88290 srtsink: Register SRT listen callback before binding socket
This change https://github.com/Haivision/srt/pull/2683 forces us to
call `srt_listen_callback` before `srt_listen`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7688>
2024-11-01 12:45:18 +00:00
Francisco Javier Velázquez-García
28c18b5390 srtsink: Add guard for null error when SRT open fails
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7688>
2024-11-01 12:45:18 +00:00
Albert Sjolund
771e73c2d5 appsrc: Fix use-after-free when making buffer / buffer-lists writable
make_writable can cause a reallocation of the buffer, meaning that obj
would point to an invalid object, both for buffer and for bufferlist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7807>
2024-11-01 00:57:13 +00:00
Sebastian Dröge
aa3e97d67c rtsp-server: Remove pointless assertions that can happen if client provides invalid rates
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3731
Fixes CVE-2024-44331

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7739>
2024-10-25 10:20:18 +01:00
Stéphane Cerveau
5d69630e33 scenechange: fix memory leak
A reference to the last buffer(oldbuf) was kept
leading to a memory leak on stop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7673>
2024-10-16 12:41:46 +01:00
Sebastian Dröge
cbd12d2969 qtdemux: Check fourcc of a second CEA608 atom instead of assuming it's cdt2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7621>
2024-10-08 19:49:22 +00:00
Sebastian Dröge
62de06c7a4 qtdemux: Skip zero-sized boxes instead of stopping to look at further boxes
A zero-sized box is not really a problem and can be skipped to look at any
possibly following ones.

BMD ATEM devices specifically write a zero-sized bmdc box in the sample
description, followed by the avcC box in case of h264. Previously the avcC box
would simply not be read at all and the file would be unplayable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7620>
2024-10-08 18:39:27 +00:00
Arun Raghavan
adde0d9757 pad: Check data NULL-ness when probes are stopped
We were correctly handling this for buffers, but not events and queries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7619>
2024-10-08 17:23:01 +00:00
Nirbheek Chauhan
1c892fd968 Revert "meson: Fix invalid include flag in uninstalled gl pc file"
This reverts commit 9d719b9937.

The old pkg-config implementation errors out if a variable specified
in the pkgconfig file is not defined, so this actually broke
uninstalled pc files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7618>
2024-10-08 12:32:36 -04:00
Sebastian Dröge
6ca6b8c553 avdemux: Never return 0 from read function
Instead return AVERROR_EOF. The read function must never ever return 0 according
to the documentation, and in practice this leads to infinite loops.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3369

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7496>
2024-09-11 06:26:26 +00:00
Thibault Saunier
b789d53b22 osxaudio: Avoid dangling pointer on shutdown
When tearing down the elements we were still referring to the ringbuffer unique_id
as our property while it was already freed, leading to potential segfaults when
accessing the property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7498>
2024-09-11 02:15:52 +00:00
Jan Schmidt
cb5203efea gstplayer: Check GstPlayerSignalDispatcher type
Before trying to retrieve a GMainContext from a provided
GstPlayerSignalDispatcher, check that it is actually
GstPlayerGMainContextSignalDispatcher. If not, use the
default GMainContext for dispatching signals via the adapter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7497>
2024-09-11 01:31:08 +00:00
Jesper Jensen
1c4487f11a avprotocol: Return EOF when stream is out of data
According to the ffmpeg documentation[1] the read_packet function should never
return 0. ffmpegdata_peek returns 0 when the stream is EOF causing us to fail
detecting EOF and never close the pipeline, continually spinning on more data.
ffmpeg instead wants an AVERROR_EOF code for to signal EOF.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7495>
2024-09-10 23:51:07 +01:00
Víctor Manuel Jáquez Leal
93be216910 pbutils: descriptions: use subsampling factor to get YUV subsampling
The algorithm used to determine the YUV subsampling string uses width and height
subsampling factor, not the raw subsampling. Otherwise all 4:2:0 YUV frames will
be detected as 4:4:4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7360>
2024-08-15 01:55:27 +01:00
Jordan Petridis
419e541199 ci: Avoid g-ir-scanner spurious issue
Recently something has caused it to error out, but only sometimes.

Ignore the cache so the CI will be reliable again.

Close #3197

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7331>
2024-08-08 19:12:39 +01:00
Tim-Philipp Müller
532214785a aom: av1enc: restrict allowed input width and height
Restrict allowed input resolution to something sensible
in light of libaom CVE-2024-5171.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7327>
2024-08-08 16:16:58 +01:00
Jan Schmidt
7b2bc55e80 webrtc: Add missing G_BEGIN/END_DECLS in header
Fix using webrtc.h from C++ by adding the GLib begin/end
decls markers around the header contents in webrtc_fwd.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7314>
2024-08-06 14:52:17 +01:00
Chris Spoelstra
5fa9e5b26c srtsrc: fix case fallthrough of authentication param
Add missing breaks to two case statements.
Also adds a missing lock of srtobject->element when getting the value
of PROP_AUTHENTICATION.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7273>
2024-07-30 13:05:02 +00:00
tomaszmi
7bb940d6be avtp: Fixed Linux/Alpine 3.20 build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7272>
2024-07-30 12:11:33 +00:00
Loïc Yhuel
0974044452 meson: fix SIZEOF_OFF_T when cross-compiling with Meson >= 1.3.0
https://mesonbuild.com/Release-notes-for-1-3-0.html#clarify-of-implicitlyincluded-headers-in-clike-compiler-checks

With only stddef.h, off_t is not defined, so when cross-compiling SIZEOF_OFF_T is -1.
We now use sys/types.h which should define off_t.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7271>
2024-07-30 11:24:11 +00:00
Tim-Philipp Müller
80a2bd1a51 rtpdtmfdepay: add unit test for caps fixation issue with downstream audioconvert
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7268>
2024-07-30 10:42:31 +00:00
Tim-Philipp Müller
e4f3ce2459 rtpdtmfdepay: fix caps negotiation with audioconvert
Specify "layout" field in src template to make sure it's
set and gets fixated properly if the downstream element
supports both interleaved and non-interleaved caps.

Fixes

  gst_pad_set_caps: assertion 'caps != NULL && gst_caps_is_fixed (caps)' failed

critical with e.g.

  gst-launch-1.0 rtpdtmfsrc ! rtpdtmfdepay ! audioconvert ! fakesink

Not that the layout really matters in our case since we always
output mono anyway, but non-interleaved requires adding AudioMeta,
so this is the easiest fix.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7268>
2024-07-30 10:42:31 +00:00
Zach van Rijn
4b71094f30 pcapparse: Avoid unaligned memory access
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3602
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7266>
2024-07-30 10:00:18 +00:00
Sebastian Dröge
a0a54303cb typefind: Fix handling of ID_ODD_SIZE in WavPack typefinder
Chunks are always starting on an even position and this flag only
specifies that the last byte of the chunk is not valid.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3569

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7262>
2024-07-30 09:15:18 +00:00
Nirbheek Chauhan
0b79124bdd docs: CI insists that this docs update must be applied
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7270>
2024-07-30 08:33:04 +00:00
Nirbheek Chauhan
b3e5d85645 meson: Fix invalid include flag in uninstalled gl pc file
${libdir}/gstreamer-1.0/include is only valid after installation, but
extra_cflags are added unconditionally, so we can't use that for
include flags.

Instead, let's add the include flag via variables, which are different
for installed and uninstalled pc files.

This is particularly bad for consuming GStreamer via CMake which barfs
on non-existent include paths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7270>
2024-07-30 08:33:04 +00:00
Jan Schmidt
ac0f9d63d3 adaptivedemux: Fix handling closed caption streams
Fix a typo "CLOSED_CAPTION" -> "CLOSED-CAPTION" and
a broken if statement that always bailed out for
closed captions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7269>
2024-07-30 07:49:11 +00:00
Sebastian Dröge
ea564bf2d4 av1dec: Don't treat decoding errors as fatal and print more error details
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7267>
2024-07-30 06:23:51 +00:00
Mathieu Duponchelle
b5a308b70a rtspsrc: fix invalid seqnum assertions
Upon fatal errors the loop function will first post an error message
then push out an EOS event.

An application may react immediately to the error message by setting the
state of the pipeline to NULL, meaning by the time we push out the EOS
event PAUSED_TO_READY may have reset the seek seqnum to -1.

While this is harmless, the assertion when setting an invalid seqnum
isn't tidy, fix this by simply not resetting to INVALID as it serves no
practical purpose and the next READY_TO_PAUSED will select a new seqnum
anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7265>
2024-07-30 04:57:45 +00:00
Sebastian Dröge
b8fdd7f72a av1enc: Handle force-keyunit events properly by requesting keyframes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7264>
2024-07-30 04:06:22 +00:00
Sebastian Dröge
016a76ecb1 dtlssrtpenc: Don't crash if no pad name is provided when requesting a new pad
It is mandatory to provide a valid pad name for dtlssrtpenc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7263>
2024-07-30 03:23:20 +00:00
Sergey Krivohatskiy
cff4135b04 flacparse: fix buffer overflow in gst_flac_parse_frame_is_valid
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7261>
2024-07-30 02:42:57 +01:00
Sebastian Dröge
627b0f1764 audioconvert: Add test for 96 channel conversion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6829>
2024-07-26 09:59:05 +00:00
Sebastian Dröge
76b65d643b level: Don't post a message on EOS without a valid audio info
If EOS is received before caps, e.g. because of an error, then rate and
number of channels would be 0 and some divisions by zero would happen.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6829>
2024-07-26 09:59:05 +00:00
Sebastian Dröge
b7d4ccd7f2 audioconvert: Support converting >64 channels
There's nothing requiring <= 64 channels except for getting the reorder
map and creating a channel mixing matrix, but those won't be possible to
call anyway as channel positions can only express up to 64 channels.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6829>
2024-07-26 09:59:05 +00:00
Sebastian Dröge
9a2aa2ca77 av1enc: Use 1/90000 as timebase and don't use the framerate at all
This mirrors the behaviour in vp8enc / vp9enc and is generally more
useful than using any framerate from the caps as it provides some degree
of accuracy if the stream doesn't have timestamps perfectly according to
the framerate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6922>
2024-05-26 09:18:26 +00:00
Sebastian Dröge
8db6f1c929 av1enc: Fix last timestamp tracking so it actually works
This behaves exactly the same as in vp8enc / vp9enc now.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3546

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6922>
2024-05-26 09:18:26 +00:00
Sebastian Dröge
14713c9964 clock: Fix 32 bit assertions in GST_TIME_TO_TIMEVAL and GST_TIME_TO_TIMESPEC
On various 32 bit systems, time_t is actually 64 bits while long is
still only 32 bits. The macro would wrongly trigger its assertion in
this case if a value with more than 68 years worth of seconds is
converted.

Examples are various newer 32 bit platforms and old ones that are
compiled with -D_TIME_BITS=64.

Also statically assert that time_t is either 32 or 64 bits. Other values
might need adjustments in the macro.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6924>
2024-05-26 08:33:15 +00:00
Sebastian Dröge
85c838d881 dtlsconnection: Fix overflow in timeout calculation on systems with 32 bit time_t
If a timeout of more than 4295s was scheduled, the calculation would
overflow and a too short timeout would be used instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6923>
2024-05-25 19:43:29 +03:00
Sebastian Dröge
decc5af69f gtk: Fail initialization of the sink if GTK4 is already initialized in the same process
Initializing GTK3 and GTK4 in the same process does not work and is not
supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6906>
2024-05-23 10:31:19 +01:00
Jordan Petridis
a746376e3f tests/check: Avoid using "bool" for the variable name
Glib 2.82 will be aliasing [1] TRUE and FALSE to the C99
definitions, which means it will be including stdbool.h

As such, having variables named "bool" causes issues
since it conflicts with the symbol defined in stdbool.h

[1] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4001

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6897>
2024-05-22 00:19:18 +01:00
Joshua Breeden
27c95064aa videotestsrc: add mutex around cache buffer to prevent race condition
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6890>
2024-05-21 14:48:47 +01:00
Edward Hervey
43dcbd5bf9 avvidec: Fix dropping wrong "ghost" frames
This fixes the code regarding dropping "ghost frames", that is to say input
frames which ended up not producing any decoded frame.

The iteration itself makes sense.. but it was stopping at the "input" frame and
not the decoded frame we just got back.

When dealing with I-frame codecs, ffmpeg will decode frames in separate frames,
so there is no guarantee that they are decoding in order.

Fixes playback issues with such codecs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6846>
2024-05-14 14:00:01 +01:00
Piotr Brzeziński
e7dd50f110 audiovisualizer: Add simple pipeline unit test
Creates pipelines with each of our visualizer elements and runs them with 20 buffers from audiotestsrc.
Added after a completely broken (segfaulting) synaescope went unnoticed for a while.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6815>
2024-05-07 18:53:20 +01:00
Bill Nottingham
9bcd51d6ed pbutils: fix visualization plugins
inbuf is persistent, GST_BUFFER_COPY_MEMORY's append behavior is
not what we want.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6815>
2024-05-07 18:53:20 +01:00
Tim-Philipp Müller
3dff559d8b Back to development after 1.22.12 2024-04-30 00:10:11 +01:00
Tim-Philipp Müller
d2c02bb704 Release 1.22.12 2024-04-29 20:52:29 +01:00
Sebastian Dröge
1ceedfd2c1 exiftag: Prevent integer overflows and out of bounds reads when handling undefined tags
Fixes ZDI-CAN-23896
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3483

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6767>
2024-04-29 20:52:19 +01:00
Tim Blechmann
810876d3d4 v4l2: silence valgrind warning
Valgrind complains about uninitialized memory used in an ioctl

    Syscall param ioctl(VKI_V4L2_G_TUNER).reserved points to uninitialised byte(s)
       at 0x719294F: ioctl (ioctl.c:36)
       by 0x3126A817: gst_v4l2_fill_lists (v4l2_calls.c:185)
       by 0x3126A817: gst_v4l2_open (v4l2_calls.c:589)
       by 0x3123F1C2: gst_v4l2_device_provider_probe_device (gstv4l2deviceprovider.c:122)
       by 0x3123F648: gst_v4l2_device_provider_device_from_udev (gstv4l2deviceprovider.c:301)
       by 0x3123F998: provider_thread (gstv4l2deviceprovider.c:395)
       by 0x796FA50: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4)
       by 0x710CAC2: start_thread (pthread_create.c:442)
       by 0x719DA03: clone (clone.S:100)
     Address 0x44008a34 is on thread 11's stack
     in frame #1, created by gst_v4l2_open (v4l2_calls.c:524)
     Uninitialised value was created by a stack allocation
       at 0x3126A024: gst_v4l2_open (v4l2_calls.c:524)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6760>
2024-04-29 15:42:09 +01:00