Commit graph

114180 commits

Author SHA1 Message Date
Tim-Philipp Müller e2107f0a0f Release 1.20.7 2023-07-26 16:18:38 +01:00
Tim-Philipp Müller c56541433b Update ChangeLogs for 1.20.7 2023-07-26 16:18:25 +01:00
Sebastian Dröge 1288d9d678 rmdemux: Check for integer overflow when calculation audio packet size
Fixes ZDI-CAN-21444
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2782

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5077>
2023-07-20 00:23:36 +01:00
Sebastian Dröge 8cf933f716 rmdemux: Use GST_LOG_OBJECT instead of GST_LOG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5077>
2023-07-20 00:23:36 +01:00
Sebastian Dröge 45a0654eff rmdemux: Check that enough SIPR audio data is available when copying
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5077>
2023-07-20 00:23:36 +01:00
Sebastian Dröge 40440bce66 rmdemux: Check for integer overflows when calculating the size of SIPR audio buffers
Fixes ZDI-CAN-21443
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2782

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5077>
2023-07-20 00:23:36 +01:00
Sebastian Dröge af2ec8e606 rmdemux: Use GST_LOG_OBJECT instead of GST_LOG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5077>
2023-07-20 00:23:36 +01:00
Sebastian Dröge 1a3ce801cf subparse: Skip after the end of a valid closing tag instead of only skipping <
This is a small optimization and avoids restarting the next parsing
iteration on already accepted data.

On its own it would also fix ZDI-CAN-20968 (see previous commit) but the
previous commit independently is also a valid fix for it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4900>
2023-06-21 01:04:28 +00:00
Sebastian Dröge 7632b0c2a0 subparse: Look for the closing > of a tag after the opening <
Previously when fixing up subrip markip, we were looking from the start
of the remaining buffer instead. Due to how skipping over closing tags
works, the remaining buffer will still contain the closing `>` of the
previous tag so if a unexpected closing tag is found after another
closing tag, we would potentially do an out of bounds memmove().

Fixes ZDI-CAN-20968
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2662

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4900>
2023-06-21 01:04:28 +00:00
Sebastian Dröge b9a357db5a dvdspu: Avoid integer overflow when checking if enough data is available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4902>
2023-06-21 00:14:38 +00:00
Sebastian Dröge ef83d981d1 dvdspu: Make sure enough data is allocated for the available data
If the size read from the stream is smaller than the currently available
data then the size is bogus and the data should simply be discarded.

Fixes ZDI-CAN-20994
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2660

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4902>
2023-06-21 00:14:38 +00:00
Sebastian Dröge 09cb143afa tags: Don't allow image tags with G_MAXUINT32 length
This will cause an integer overflow a little bit further down because we
allocate a bit more memory to allow for a NUL-terminator.

The caller should've avoided passing that much data in already as it's
not going to be a valid image and there's likely not even that much data
available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4901>
2023-06-20 12:09:10 +01:00
Sebastian Dröge 75955d13e2 flacparse: Avoid integer overflow in available data check for image tags
If the image length as stored in the file is some bogus integer then
adding it to the current byte readers position can overflow and wrongly
have the check for enough available data succeed.

This then later can cause NULL pointer dereferences or out of bounds
reads/writes when actually reading the image data.

Fixes ZDI-CAN-20775
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4901>
2023-06-20 12:09:10 +01:00
Nicolas Dufresne 3501ce0226 medias: Bump the medias commit
See !4259

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4884>
2023-06-18 13:23:35 +01:00
Nicolas Dufresne e1793a27b8 h265parse: Don't override upstream framerate
The framerate should only be replaced (and corrected for alternating field)
when it is parsed from the bitstream. Otherwise, the upstream framerate
from caps should be trusted and assumed correct.

Related to gst-plugins-bad!2020

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4884>
2023-06-18 11:30:18 +01:00
Nicolas Dufresne ee6c086b5c h265parse: Rename parsed_framerate to framerate_from_caps
That meaning of parsed_framerate is ambigious, it is set whenever the
framerate has been parsed from caps, which can be confused with being
parsed from the bitstream. Rename this as framerate_from_caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4884>
2023-06-18 11:30:13 +01:00
Mengkejiergeli Ba 7638645650 h265parse: Fix to check returned value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4884>
2023-06-18 11:30:06 +01:00
Tim-Philipp Müller fee8c581d2 asfmux: fix potentially unaligned write on 32-bit ARM
Fixes #2665

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4856>
2023-06-14 09:12:51 +01:00
Tim-Philipp Müller ad8bcb0aaf tests: rtpbin_buffer_list: fix possible unaligned read on 32-bit ARM
Fixes #2666

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4856>
2023-06-14 09:12:51 +01:00
Seungha Yang 72684d49c9 filesink: Fix buffered mode writing
Fixing miscalculated buffer index when a buffer holds multiple
memories and it's not aligned to the vector size 16

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4854>
2023-06-14 00:36:34 +01:00
Sebastian Dröge 74cb9a90ad ptp: Correctly parse clock ID from the commandline parameters in the helper
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2652

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4838>
2023-06-12 14:08:23 +01:00
Tim-Philipp Müller 14f0d6c18d qtdemux: add unit test for edit list regression
File is the mp4 file from #2549 with the mdat atom
zeroed out and compressed. We compress twice because
apparently compressing 5MB of zeroes effectively in
one run is too difficult for gzip.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2549

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4833>
2023-06-11 23:02:02 +00:00
Mathieu Duponchelle 831cff876d Revert "qtdemux: fix conditions for end of segment in reverse playback"
This reverts commit 9deb3c27ac.

The test case that was described in the associated MR
(https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/262)
remains adequately fixed by a related MR that was merged later
(https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/275).

It introduced incorrect logic that broke edit lists as described in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2549

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2549
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4833>
2023-06-11 23:02:02 +00:00
Sebastian Dröge 6df59ec79f ptp: Work around bug in ptpd in default configuration
ptpd is defaulting to the hybrid mode, and was sending invalid multicast
PTP messages in that configuration until ce96c742a88792a8d92deebaf03927e1b367f4a9.
While this commit was made in 2015 there was no release in the meantime.

Work around this by detecting this case and defaulting to the default
values for the given intervals as given by the PTP standard.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4834>
2023-06-11 18:11:58 +00:00
Sebastian Dröge cd9420bcd6 qtmux: Fix extraction of CEA608 data from S334-1A packets
The index is already incremented by 3 every iteration so multiplying it
by 3 additionally on each array access is doing it twice and does not
work.

This caused invalid files to be created if there's more than one CEA608
triplet in a buffer, and out of bounds memory reads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4832>
2023-06-11 17:18:01 +00:00
Sebastian Dröge 09cc614bb1 avviddec: Temporarily unlock stream lock while flushing buffers
This can call into the decoder again from other threads and try to take
the stream lock from there, which would cause a deadlock.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4831>
2023-06-11 16:47:53 +00:00
Seungha Yang 28084aef3e video-blend: Fix linking error with C++
Add missing extern "C"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4830>
2023-06-11 15:23:36 +00:00
Jan Alexander Steffens (heftig) 5a379facdd tests: allocators: Fix fdmem test with recent GLib
The test failed with recent GLib, where `g_close` emits a critical
warning on EBADF. Remove the `g_close` check from `test_fdmem` and add
another version that tests `GST_FD_MEMORY_FLAG_DONT_CLOSE`.

We will depend on the Valgrind test run to warn us about leaked FDs.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2480
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4829>
2023-06-11 15:30:06 +01:00
Sebastian Dröge 8442bbf666 rtspsrc: Skip PTs with caps incompatible to the global caps
Otherwise empty caps are created while all following code assumes that
the caps will have exactly one structure, and then run into assertions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4568>
2023-05-06 23:20:03 +00:00
Sebastian Dröge a74bf2a45e tsdemux: Set number of channels to 2 for dual mono Opus
Instead of leaving it at 0, which will then cause caps creation to fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4565>
2023-05-06 22:48:06 +00:00
Sebastian Dröge eaa83829ce rtsp-server: media: First set state to PLAYING again temporarily, then send EOS
Sending the EOS event while the pipeline is PAUSED can deadlock on the
stream lock if a sink is currently blocked because of pre-rolling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4569>
2023-05-06 21:42:14 +00:00
Sebastian Dröge 8ddf69b681 rtspsrc: Fix handling of * control path
Regression introduced by 7f9d689572.
Thanks to Tristan Matthews for reporting this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4566>
2023-05-06 20:39:29 +00:00
Sebastian Dröge 694ad96545 audiotestsrc: Initialize all samples in wave=ticks mode
Previously samples were only initialized in 2 out of 3 cases.

Probably fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/337

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4564>
2023-05-06 20:22:19 +01:00
Edward Hervey f97e0d9777 qtdemux: Fix av1C parsing
This is a regression introduced by
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3882

The av1c codec configuration parsing would always fail due to an off-by-one
error, the content of an atom starting at offset 8 (i.e. the 9th byte) and not
9 (the 10th byte).

Also introduce a break in order to not get stray warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4434>
2023-04-17 10:02:09 +01:00
Jan Alexander Steffens (heftig) 026e82361b imagesequencesrc: Properly set default location
Noticed this because the generic_states test kept segfaulting at random.
GLibC 2.37 can crash when NULL is supplied as a format string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4431>
2023-04-16 16:08:01 +01:00
Nicolas Dufresne e3fa7c0dda glimagesink: Fix render rect assertion
Whenever the surface is resized before the stream is negotiated, we endup
with an assertion in libgstvideo.

  gst_video_center_rect: assertion 'src->h != 0' failed

This fixes it, by following the style aready in place, which is to ensure
surfaces have a minimum size of 1x1.

Fixes #1139

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4303>
2023-03-30 01:10:09 +01:00
Tim-Philipp Müller de5ebc31fc rtpjpegdepay: fix logic error when checking if an EOI is present
We wouldn't add the missing EOI marker if the frame ended with
either 0xFF NN or 0xNN D9.

Fixes #2407

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4271>
2023-03-25 03:36:40 +00:00
Adrien De Coninck c2b912ce74 ksdeviceprovider: Fix leak in gst_dshow_device_provider_start
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4270>
2023-03-25 01:00:59 +00:00
Adrien De Coninck 3acfd8274e dshowdeviceprovider: Fix leak in gst_dshow_device_provider_start
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4270>
2023-03-25 01:00:59 +00:00
Matthew Waters ff204668c3 cea708overlay: fix HCR interpretation
An unsigned counter with a for (i = end; i >= 0; i--), can be optimized to
infinite loop as an unsigned value will always be >= 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4174>
2023-03-15 02:56:16 +00:00
Matt Feury bb711444b6 rtspsrc: Consider "451: Parameter Not Understood" when handling broken control urls
similar to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3854

it seems that some implementations return this when
the server does not implement URL handling correctly

this fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2334

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4173>
2023-03-14 21:33:21 +00:00
Sebastian Dröge 6b16b41889 ffmpeg: avauddec/avviddec: Free packet side data after usage
As we don't use proper refcounting with AVPacket we have to manage this
ourselves.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4079>
2023-02-28 13:51:12 +00:00
Enrique Ocaña González ccb77f72ef gsturisourcebin: Don't try to plug a typefinder on dynamic sources.
setup_source() tries to plug a typefind element unconditionally to the
source element on non-live streams, no matter if the element is dynamic
or not. In the former case, the element might not have any src pad
created, so the plugging will fail, triggering an unrecoverable error.

This patch only tries the plugging when the element is not dynamic (no
new-pad callback has been configured). In case the element is dynamic,
the callback will take care of configuration when pads appear in the
future.

This solves many regressions on the YouTube MSE Conformance Tests[1] at
least in downstream WPE 2.38[2] after migrating from GStreamer 1.16 to
1.18, a change that introduces Playbin 3.

[1] https://ytlr-cert.appspot.com/latest/main.html
[2] https://github.com/WebPlatformForEmbedded/WPEWebKit/tree/wpe-2.38

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4074>
2023-02-27 18:30:20 +01:00
Tim-Philipp Müller 4599796488 Back to development 2023-02-24 00:23:26 +00:00
Tim-Philipp Müller b7d3037cca Release 1.20.6 2023-02-23 18:23:11 +00:00
Tim-Philipp Müller 1c37d0ddec Update ChangeLogs for 1.20.6 2023-02-23 18:22:59 +00:00
Tristan van Berkom 33e62f4b8e gstglwindow_x11.c: Fix colormap leak
This fixes an X server side memory leak, this is normally not severe
but in some circumstances where the glwindow is recreated frequently
it can result in a very bad memory leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4049>
2023-02-22 18:28:34 +00:00
Seungha Yang 3553194926 qtmux: Fix assertion on caps update
GstQTMuxPad.configured_caps should be protected since it's
updated from streaming thread and accessed in aggregate thread

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4048>
2023-02-22 17:46:02 +00:00
James Hilliard 9ae84e3d08 buffer: fix copy meta reference debug log formatting
Fixes the following valgrind error:
==616== Conditional jump or move depends on uninitialised value(s)
==616==    at 0x4900E34: gst_debug_print_object (gstinfo.c:1143)
==616==    by 0x49010B6: gst_info_printf_pointer_extension_func (gstinfo.c:1215)
==616==    by 0x4959FDB: __gst_printf_pointer_extension_serialize (printf-extension.c:47)
==616==    by 0x495A487: printf_postprocess_args (vasnprintf.c:258)
==616==    by 0x495A52C: __gst_vasnprintf (vasnprintf.c:290)
==616==    by 0x4959F8F: __gst_vasprintf (printf.c:154)
==616==    by 0x4901C1F: gst_debug_message_get (gstinfo.c:791)
==616==    by 0x4901C75: _gst_debug_log_preamble (gstinfo.c:1431)
==616==    by 0x4903208: gst_debug_log_default (gstinfo.c:1575)
==616==    by 0x49020BA: gst_debug_log_full_valist (gstinfo.c:624)
==616==    by 0x490211D: gst_debug_log_valist (gstinfo.c:656)
==616==    by 0x49021AD: gst_debug_log (gstinfo.c:533)
==616==    by 0x48DDC11: gst_buffer_copy_into (gstbuffer.c:693)
==616==    by 0x48DF5F1: gst_buffer_copy_with_flags (gstbuffer.c:727)
==616==    by 0x48DF640: gst_buffer_copy_deep (gstbuffer.c:756)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4037>
2023-02-22 10:27:07 +00:00
Sebastian Dröge 3e596c9038 qtmux: Implement writing of av1C version 1 box
Version 0 is ancient and not specified in any documents. Take it
directly from the `codec_data` if presents or otherwise try to construct
a reasonably looking `av1C` box.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4028>
2023-02-21 19:11:34 +00:00