Commit graph

4083 commits

Author SHA1 Message Date
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
Jimmy Ohn
2f40a0c0d6 pulsedeviceprovider: Add is_default_device_name function and missing lock
Add is_default_device_name function to simplify compare device type
name and fix the missing lock when accessing default_sink_name and
default_source_name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6640>
2024-04-15 06:38:53 +00:00
Sebastian Dröge
6476fac04f rtpbin: Don't re-use a variable for a completely different purpose temporarily
During RTP-Info synchronization, clock_base was temporarily switched
from the actual clock-base to the base RTP time and then back some lines
later.

Instead directly work with the base RTP time. The comment about using a
signed variable for convenience doesn't make any sense because all
calculations done with the value are unsigned.

Similarly, rtp_clock_base was overridden with the rtp_delta when
calculating it, which was fine because it is not used anymore
afterwards. Instead, introduce a new variable `rtp_delta` to make this
calculation clearer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6639>
2024-04-15 01:27:28 +01:00
Sebastian Dröge
93f93847e8 rtpbin: Convert clock-base to extended RTP timestamp correctly
It's not in the same period as the current RTP base time but always in
the very first period. This avoids using it again at a much later time.

The code in question is only triggered with rtcp-sync=rtp-info.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6639>
2024-04-15 01:27:28 +01:00
Sebastian Dröge
d2b00b045a rtpjitterbuffer: Use an extended RTP timestamp for the clock-base
It is compared to other extended RTP timestamps all over rtpjitterbuffer
and since 4df3da3bab the initial extended RTP timestamp is not equal
anymore to the plain RTP time.

Continue passing a non-extended RTP timestamp via the `sync` signal for
backwards compatibility. It will always be a timestamp inside the first
extended timestamp period anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6639>
2024-04-15 01:27:27 +01:00
Thomas Goodwin
344ead31a6 gst-inspect: fix --atleast-version to be implicitly applied to --exists
The --atleast-version implies --exists, but the implementation in
earlier commits had the version check applied any time the --exists was
checked, and the default value of the major and minor versions were set
to the GStreamer major and minor versions.  The resulting behavior would
have gst-inspect return '1' if the plugin's version didn't match
gstreamer's even when --atleast-version was not specified in the command
line args.  The change in this patch removes that behavior and adds
tests to verify that if --exists is specified WITHOUT --atleast-version
the version check will NOT be applied.  If both arguments are specified
and the version does not match the arg-supplied version number, a new
return code of '2' is used to uniquely identify the failure.

Fixes #3246

Signed-off-by: Thomas Goodwin <thomas.goodwin@laerdal.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6415>
2024-04-14 15:07:40 +00:00
Sebastian Dröge
2b5930f6a0 wavpackparse: Use an unsigned integer for the block size calculations
It's never negative.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6564>
2024-04-08 09:34:13 +00:00
Sebastian Dröge
6953204a9c wavpackparse: Fix potential integer overflow on ID_ODD_SIZE blocks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6564>
2024-04-08 09:34:12 +00:00
Sebastian Dröge
18548cdd76 wavpackparse: Explicitly handle ID_WVX_NEW_BITSTREAM
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6564>
2024-04-08 09:34:12 +00:00
Sebastian Dröge
32e077cb67 typefind: Handle WavPack block sizes > 131072
These are valid nowadays.

Also handle ID_ODD_SIZE and ID_WVX_NEW_BITSTREAM. The parser already
handles the former but not the latter.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6564>
2024-04-08 09:34:12 +00:00
Elliot Chen
7e7f998f77 v4l2: fix error in calculating padding bottom for tile format
This is a regression while porting to arbitrary tile dimensions
introduced in !3424.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6565>
2024-04-08 02:22:36 +00:00
eri
2aef1d6ccd play: Update video_snapshot to support playbin3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6563>
2024-04-07 23:56:39 +01:00
Alexander Slobodeniuk
21975e8d62 d3d11videosink: disconnect signals before releasing the window
It might happen that the key event arrives when the d3d11videosink
is stopping. In case of GstD3D11WindowWin32 it can raise a
navigation event even when the sink is already freed, because the
window object's refcount may reach 0 in the window thread. In
other words sometimes the GstD3D11WindowWin32 lives few ms more
then the GstD3D11VideoSink, because it's freed asynchronously.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6493>
2024-03-31 13:13:30 +01:00
Tim-Philipp Müller
37bacb49a9 tests: rtpred: fix out-of-bound writes
Don't write more data to the buffer than we allocated
space for.

Fixes #3312

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6479>
2024-03-29 00:22:57 +00:00
Nicolas Dufresne
ae8bc27fdf v4l2codecs: alphadecoder: Explicitly pass 64 bit integers as such through varargs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6470>
2024-03-28 12:11:44 +00:00
Sebastian Dröge
fcf22b3790 alphadecodebin: Explicitly pass 64 bit integers as such through varargs
Maybe fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3422

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6470>
2024-03-28 12:11:44 +00:00
Arnaud Vrac
801a6e5faa inputselector: fix possible clock leak on shutdown
Avoid leaking a GstClock object on shutdown, bail out before taking the ref when
not playing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6458>
2024-03-28 10:34:52 +00:00
Taruntej Kanakamalla
b014650cbe net/gstptpclock: fix double free of domain data during deinit
The attempt to free the domain data is happeing twice during the ptp deinit.
Once while iterating through the list domain_data and second while iterating
through the list domain_clocks, so this is crashing the application
trying to gst_ptp_deinit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6459>
2024-03-27 15:01:55 +00:00
Tim-Philipp Müller
3abc1c8c7b Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6408>
2024-03-20 00:07:00 +01:00
Tim-Philipp Müller
e49b86e82e Release 1.22.11 2024-03-19 22:01:08 +01:00
Mark Nauwelaerts
682c749ac1 dvdspu: avoid null dereference
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6390>
2024-03-18 20:37:12 +00:00
Matthew Waters
a81772f9f5 vulkan/wayland: use xdg_wm_base when available
wl_shell is deprecated and has been removed from some compositors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6396>
2024-03-18 17:44:50 +01:00
Matthew Waters
7d7ad5682b vulkan/wayland: provide a dummy registry global_remove function
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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6396>
2024-03-18 17:44:34 +01:00
Matthew Waters
1eb5217fd1 vulkan/wayland: rename debug category to mention wayland instead of XCB
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6396>
2024-03-18 17:44:26 +01:00