Commit graph

4106 commits

Author SHA1 Message Date
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
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
Tim Blechmann
e6480f6913 soup: fix thread name
thread names should be below 16char, otherwise they won't be shown on
linux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6738>
2024-04-26 12:36:24 +01:00
Nirbheek Chauhan
974208538f meson: Don't link to python for the gi overrides module
We only need to link to python directly for the plugin:

https://github.com/mesonbuild/meson/issues/7712#issuecomment-689357908

https://github.com/Homebrew/homebrew-core/pull/165176#issuecomment-2051835257

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6642>
2024-04-25 20:19:47 +00:00
Philippe Normand
6d13bb31e9 debug-viewer: Fix plugin loading machinery
The previous code was failing at least with Python 3.11 and Python 3.12.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6677>
2024-04-17 18:20:44 +01:00
Jan Schmidt
7b6959edf2 dvbsubenc: fixed some memory leaks and a crash
Fix leaks of internal GstBuffers, and a crash if subtitle segments end
up empty.

Based on a patch by Jurijs Satcs <jurijs.satcs@veset.tv>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6673>
2024-04-17 14:27:03 +01:00
F. Duncanh
f8b6749f21 ximagesink: initialize mask for XISelectEvents
Fixes #3470

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6655>
2024-04-16 10:26:33 +01:00
Sebastian Dröge
3eedd8221c basesrc: Clear submitted buffer lists consistently with buffers
And handle the case of a NULL buffer being returned cleanly, which is
valid as long as a buffer list is returned instead. Previously this
would cause an assertion because of calling gst_buffer_unref() with
NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6462>
2024-04-15 19:07:08 +00:00
Matthew Waters
17b0b949a4 glcaopengllayer: NULL some fields when freed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6566>
2024-04-15 15:28:45 +00:00
Matthew Waters
592f85fd6c glwindow/cocoa: keep a window reference across an async callback
Esnures that the window is alive when the callback is fired.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6566>
2024-04-15 15:28:45 +00:00
Matthew Waters
b7b2b80de1 glimagesink: avoid a possible critical on shutdown
It is possible that the close callback can be called after glimagesink
is changing state to NULL.  Protect against that by taking the glimagesink
lock and some NULL checking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6566>
2024-04-15 15:28:45 +00:00
Matthew Waters
84acc6a6d3 glimagesink: unref the potential last ref outside of the glimagesink lock
Avoids a deadlock between the state change removing the last ref and
the destructer calling the window's on_close handler and trying to
take the glimagesink lock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6566>
2024-04-15 15:28:44 +00:00
Matthew Waters
8cacf850fe gl/context/cocoa: ensure pixel format lives as long as the context
Under some circumstances, the CGLPixelFormatObj was being destroyed too
early which could lead to potential use-after-frees.

Fix by returning a reference when asked for the pixel format.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3154
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6566>
2024-04-15 15:28:44 +00:00
Qian Hu (胡骞)
c3238be321 qtdemux: fix wrong full_range offset when parsing colr box
use colr_data[18] >> 7 to get full range information, instead
of colr_data[17] >> 7

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6641>
2024-04-15 07:52:29 +00:00