Commit graph

278 commits

Author SHA1 Message Date
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
Yang, Xuchen 59e5126ddc audio: channel-mix: Fix channel count limit to be able to equal 64
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3956>
2023-02-14 11:02:18 +00:00
Sebastian Dröge b6a400ae6b sdp: Fix gst_mikey_payload_key_data_set_interval() array length annotation
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1744

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3794>
2023-01-26 03:19:46 +00:00
F. Duncanh 82ad60e905 plugins-base/tests/check/meson.build: add omitted Wayland dependence
SUSE places Wayland include files in /usr/include/wayland, and needs
a Cflag added to wayland_client_deps by pkg-config, which is added to
gl_winsys_deps: add this as a dependency in gstgl_dep to fix issue.

Fixes #1607

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3768>
2023-01-22 18:53:36 +00:00
Tim-Philipp Müller 4b43b06093 gst-plugins-base: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3764>
2023-01-21 11:15:49 +00:00
Sebastian Dröge ce7bc581f1 gl: Mark gst_gl_context_new_wrapped() return value as nullable
If a GL context is requested for which no API support is compiled in
then `NULL` is returned.

Also remove a useless `NULL` check: `g_object_new()` can't possibly
return `NULL`, ever.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3668>
2023-01-02 00:05:30 +00:00
Nirbheek Chauhan 996b9ebd9e meson: Add gstreamer-gl-1.0 pkgconfig vars to internal dependency
So we can fetch gl_winsys, gl_platforms, etc directly using
gst_gl_dep.get_variable() when building gstreamer as a subproject, or
when building gst-plugins-rs's gtk4 plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3667>
2023-01-01 23:32:49 +00:00
Tim-Philipp Müller 4a99827d4c Back to development 2022-12-20 00:39:36 +00:00
Tim-Philipp Müller f7806a854a Release 1.20.5 2022-12-19 23:34:46 +00:00
Tim-Philipp Müller 554efedd44 Update ChangeLogs for 1.20.5 2022-12-19 23:34:34 +00:00
Philipp Zabel 18cae8c9b4 videoscale: fix valid_tags NULL-terminated array of strings
The valid_tags array of strings must be NULL-terminated,
as it is passed to the g_strv_contains() function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3604>
2022-12-19 14:37:16 +00:00
Edward Hervey 551580482d decodebin2: Minor debug fix for decodepad
decodedad might have their name changed when exposing, causing a race when
trying to get their name without taking a lock. Just use GST_PTR_POINTER in
debug statements instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:19 +00:00
Edward Hervey 595d2d283d oggdemux: Don't leak pending seek event
Make sure any pending seek event is released when going back down to READY.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3578>
2022-12-15 23:15:58 +00:00
Edward Hervey 0000476b5a parsebin: Don't leak parsepad list on shutdown
Free it as it is down in other cases

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3578>
2022-12-15 23:15:58 +00:00
Vivia Nikolaidou 989e8307b5 opusdec: Use proper guint/guint8 type conversion
Do not cast, that might yield wrong results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3576>
2022-12-15 20:31:17 +00:00
Vivia Nikolaidou 3e68bd0a11 opusdec: Negotiate default to 2 channels
In that place, dec->n_channels can still theoretically be 0. Default to
2 in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3576>
2022-12-15 20:31:17 +00:00
Tim-Philipp Müller 19566c3a06 timeoverlay: fix pad leak
Spotted by Jiri Uncovsky.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3559>
2022-12-11 17:46:13 +00:00
Sebastian Dröge c44ed8af36 textrender: Negotiate caps on a GAP event if none were negotiated yet
Otherwise downstream wouldn't have received a segment event either and
wouldn't know what to do with the gap event

And also forward any pending segment event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3548>
2022-12-08 13:05:15 +00:00
Tim-Philipp Müller 0881870219 audioconvert, audioresample, audiofilter: fix divide by 0 for input buffer without caps
gst-launch-1.0 audiotestsrc ! udpsink host=127.0.0.1
gst-launch-1.0 udpsrc ! audioconvert ! autoaudiosink

would crash with a floating point exception when clipping the input
buffer owing to a division by zero because no caps event was received.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3470>
2022-11-26 11:19:09 +01:00
Sebastian Dröge 7c0541f549 textrender: Don't pass plaintext as pango markup to Pango
Otherwise e.g. & in the text will cause Pango to complain about invalid
markup and render the text incorrectly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3458>
2022-11-23 12:49:47 +01:00
Sebastian Dröge 1bac733938 textrender: Don't blindly forward all events
Use gst_pad_event_default(), which does the right thing by default.
Especially it does not forward text/x-plain caps downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3458>
2022-11-23 12:49:47 +01:00
Edward Hervey 169bbd2fea oggdemux: Don't leak incoming EOS event
If we're going to drop it ... then do drop it :)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3412>
2022-11-15 05:31:57 +00:00
Edward Hervey 3cc45d5a36 subparse: Fix non-closed tag handling.
Unclear what the goal was, but we could end up reading way past the next_tag.

Instead just move everything from after the end tag ('>') to the next_tag.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53040

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3351>
2022-11-07 12:45:29 +00:00
Sebastian Dröge 4925002d87 core/base: Only post latency messages if the latency values have actually changed
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1525

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3291>
2022-10-27 23:18:37 +01:00
Edward Hervey 74ec0d4b0c videodecoder: Only post latency message if it changed
Posting latency messages causes a full and potentially expensive latency
recalculation of the pipeline. While subclasses should check whether the latency
really changed or not before calling this function, we ensure that we do not
post such messages if it didn't change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3291>
2022-10-27 23:15:31 +01:00
Seungha Yang c865a2b9c3 videosink: Don't return unknown end-time from get_times()
... in case of reverse playback. Otherwise basesink will not
wait for clock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3277>
2022-10-26 22:03:16 +01:00
Nirbheek Chauhan d1d365373f gl/vulkan: Fix static linking on macOS
duplicate symbol '__invoke_on_main' in:
    /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstvulkan-1.0.a(cocoa_gstvkwindow_cocoa.m.o)
    /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstgl-1.0.a(cocoa_gstglwindow_cocoa.m.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also make the same change in iOS for consistency.

Continuation of https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1132

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3263>
2022-10-25 11:06:34 +01:00
Tim-Philipp Müller a2a300a0e6 gst-plugins-base: bump core req to 1.20.4
For newly-added _gst_meta_tag_memory_reference symbol.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2928#note_1591459

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3185>
2022-10-23 17:29:40 +00:00
Matthew Waters af92290306 build/gl: fix automatic dispmanx detection for rpi4
rpi4 doesn't contain dispmanx but still contains bcm_host.pc which
confuses the configure detection.  Add an explicit check for
EGL_DISPMANX_WINDOW_T to ensure that we only build with dispmanx when
the types are available.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/893
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/952
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3246>
2022-10-22 10:42:17 +01:00
Jordan Petridis e144ec015e cdparanoia: Ignore compiler warning coming from the cdparanoia header
When trying to build the plugin, GCC starts complaining about issues
with one of the cdparanoia headers and it block us from being able
to build the plugin with Werror.

The current warning in the header look like this:

```
[1/2] Compiling C object subprojects/gst-plugins-base/ext/cdparanoia/libgstcdparanoia.so.p/gstcdparanoiasrc.c.o
In file included from ../subprojects/gst-plugins-base/ext/cdparanoia/gstcdparanoiasrc.h:37,
                 from ../subprojects/gst-plugins-base/ext/cdparanoia/gstcdparanoiasrc.c:31:
/usr/include/cdda/cdda_interface.h:164:3: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  164 |   "Success",
      |   ^~~~~~~~~
...
/usr/include/cdda/cdda_interface.h:163:14: warning: ‘strerror_tr’ defined but not used [-Wunused-variable]
  163 | static char *strerror_tr[]={
      |              ^~~~~~~~~~~
[2/2] Linking target subprojects/gst-plugins-base/ext/cdparanoia/libgstcdparanoia.so
```

Last release of cdparanoia was in 2008, so our best bet for the
time is to ignore the warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3232>
2022-10-20 11:41:10 +01:00
Edward Hervey c9006504bb gst-play: Don't leak the stream collection
We are given a reference to the collection when parsing it from the
message. Just store it (instead of referencing it again).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3191>
2022-10-15 10:15:26 +01:00
Nicolas Dufresne 0c28e3cf26 opengl: Fix usage of eglCreate/DestroyImage
The implementation was inconsistent between create and destroy. EGLImage
creation and destruction is requires for EGL 1.5 and up, while
otherwise the KHR version is only available if EGL_KHR_image_base
feature is set. Not doing these check may lead to getting a function
pointer to a stub, which is notably the case when using apitrace.

Fixes #1389

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3170>
2022-10-12 23:43:49 +00:00
Tim-Philipp Müller 825746d121 Back to development 2022-10-12 18:40:25 +01:00
Tim-Philipp Müller 642730bd67 Release 1.20.4 2022-10-12 16:39:51 +01:00
Tim-Philipp Müller 7275d3d136 Update ChangeLogs for 1.20.4 2022-10-12 16:39:40 +01:00
Jan Schmidt 1477dab01d xvimagesink: Don't leak XvShmImage
If allocating an XvShmImage generates an X error, but
still returns some allocated memory, make sure to free it
so it doesn't leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3147>
2022-10-08 10:30:04 +00:00
Jan Schmidt 2a683372bc decodebin3: Make sure event is writable before modifying
Make sure we're operating on a private copy of an event when
modifying it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3146>
2022-10-08 10:42:59 +01:00
Jan Schmidt 32e175026f urisourcebin: Make sure event is writable before modifying.
Make sure we're operating on a private copy of an event before
modifying it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3146>
2022-10-08 10:42:59 +01:00
Jan Schmidt 6e61030ded decodebin3: Don't lose a ref on EOS event
Make sure not to give away the ref on the final EOS
event for which the probe handler is returning GST_PAD_PROBE_REMOVE
when pushing the event manually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3146>
2022-10-08 10:42:59 +01:00
Aleksandr Slobodeniuk c9219a0cb6 decodebin3: fix mutex leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3130>
2022-10-07 17:19:32 +00:00
Jan Schmidt 4332635d9e playsink: Hold a reference to the soft volume element
Always hold a reference to the soft volume element
provided by the playsinkaudioconvert bin helper, the
same as when volume is provided by a sink element,
or the soft volume element gets unreffed too soon.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3113>
2022-10-03 22:53:44 +01:00
Tim-Philipp Müller 6b316052dc pbutils: descriptions: fix gst_pb_utils_get_caps_description_flags()
And add a little unit test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3098>
2022-09-30 12:51:46 +01:00
James Cowgill a08c972414 xmptag: Call gst_tag_register_musicbrainz_tags during init
We need to call this to register the MusixBrainz tags before we use
them in an XMP schema.

Fixes this critical when attempting to run jpegparse on a JPEG
containing MusicBrainz XMP tags:

  GStreamer-CRITICAL **: 20:41:07.885: gst_tag_get_type: assertion 'info != NULL' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3095>
2022-09-30 01:45:34 +01:00
Philipp Zabel 1c8244a19d buffer: drop parent meta in deep copy/foreach_metadata
The purpose of a deep buffer copy is to be able to release the source
buffer and all its dependencies. Attaching the parent buffer meta to
the newly created deep copy needlessly keeps holding a reference to the
parent buffer.

The issue this solves is the fact you need to allocate more
buffers, as you have free buffers being held for no reason. In the good
cases it will use more memory, in the bad case it will stall your
pipeline (since codecs often need a minimum number of buffers to
actually work).

Fixes #283

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3090>
2022-09-29 11:57:53 +01:00
Edward Hervey 66064568de decodebin3: Fix memory issues with active selection list
This had a couple of issues:
* The backing strings (from GstStream) could disappear
* The actual list wasn't properly reset/freed when decodebin3 was re-used

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3087>
2022-09-27 18:05:32 +00:00
Matthew Waters 2a4f96861e subparse: fix crash when parsing invalid timestamps in mpl2
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49245

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2999>
2022-09-07 15:41:13 +01:00