Commit graph

329 commits

Author SHA1 Message Date
Tim-Philipp Müller 1a603d9295 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5108>
2023-07-26 18:46:46 +01:00
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 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
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
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 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 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 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
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
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
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
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
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
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
Sebastian Dröge 9ab884833b qtdemux: Drop av1C version 0 parsing and implement version 1 parsing
The av1C box is optional so dropping parsing does not break anything
fundamentally, and there seems to be no historical record how version 0
even looks like while the comments and the parsing disagreed with each
other.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4028>
2023-02-21 19:11:34 +00:00
Enrique Ocaña González eb5e90905c qtdemux: Don't emit GstSegment correcting start time when in MSE mode
When using qtdemux in a pipeline that should only work as a pure demuxer (not
for actual playback), qtdemux shouldn't emit new GstSegments to correct
the start time (jump to the future) to ensure that the user experiences no
playback delay. By doing so, it's generating the wrong segments when an append
of data from the past happens. When that happens, downstream elements such as
parsers (eg: aacparse) may clip those buffers laying before the GstSegment and
create problems on the GStreamer client app (eg: WebKit).

Getting buffers clipped out because of the wrong GstSegments started becoming
a problen when this commit was introduced:

ab6e49e9cc audioparsers: add back segment clipping to parsers that have lost it

This clipping makes test DASH shaka 35 from MVT tests[1] to fail in
WebKitGTK/WPE (at least) and can potentially cause a number of other problems
in the WebKit Media Source Extensions (MSE) code.

Note that this new behaviour of not emitting new GstSegments only makes sense
when qtdemux is being used as a pure demuxer and not as part of a regular
pipeline. This is why the variant field has been added. When equal to
VARIANT_MSE_BYTESTREAM, it will make qtdemux behave differently in push mode,
taking decisions that meet the expectations for an MSE-like processing mode.
This kind of tweaks have been done in the past for MSS streams, for instance.
That code has been refactored to use VARIANT_MSS_FRAGMENTED now, instead of
its own dedicated boolean flag.

Co-authored by: Alicia Boya García <ntrrgc@gmail.com>

...who suggested to use "variant: mse-bytestream" in the caps to identify that
mode, as proposed in her unmerged patch:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/467

[1] https://github.com/rdkcentral/mvt

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3995>
2023-02-21 11:35:37 +00:00
Marek Vasut 997c3f4013 jpegdec: Disable libjpeg-turbo SIMD acceleration support for now
The libjpeg-turbo SIMD acceleration support suffers from multiple
unresolved cornercases. Disable the libjpeg-turbo for now until
those cornercases are resolved.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3704>
2023-02-08 10:50:00 +00:00
Sebastian Dröge 37999359a9 rtspsrc: Also consider "Method Not Valid In This State" error in broken control URL handling workaround
Some servers send a 455 error instead of any reasonable error when using
a correctly constructed control URL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3861>
2023-02-01 14:17:21 +00:00
Jan Schmidt f3b8f1d5b0 qmlglsrc: Handle HiDPI scaling
When calculating the capture framebuffer size, include
any device scaling applied to the rendered framebuffer

Fixes only capturing part of the window when there is
a global scale factor.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3622>
2023-01-31 12:21:27 +00:00
Jan Schmidt 64ec73f313 qmlglsrc: Unmap buffer before adding sync meta
Adding a sync meta to a GstBuffer requires that it
be writable. Mapping the buffer with the video frame API
holds an extra ref on the buffer, so unmap before
trying to modify it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3622>
2023-01-31 12:21:27 +00:00
Jan Schmidt d43ef0165e qmlglsrc: Stop when basesrc calls unlock()
Instead of stopping capture when the state changes,
handle other cases of basesrc stopping capture by - such
as handling an EOS event - by implementing an unlock()
method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3622>
2023-01-31 12:21:27 +00:00
Pawel Stawicki d8bef5c7e7 v4l2h264dec: Fix Raspberry Pi4 will not play video in application
Ensure object v4l2object->pool will be released by
correctly releasing the temporary thread-safety lock

Fixes issue #1729

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3795>
2023-01-26 03:55:49 +00:00
Mathieu Duponchelle f08994583f redenc: fix setting of extension ID for twcc
1 was previously hardcoded in, and the bug went under the radar because
webrtcsink hardcodes the number too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3793>
2023-01-26 02:49:50 +00:00
Tim-Philipp Müller d7bc595acd gst-plugins-good: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3764>
2023-01-21 11:15:53 +00:00
Sebastian Dröge 44532db218 matroska: Add stream-format = (string) obu-stream to AV1 caps
Anything else is not allowed in Matroska/WebM.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3741>
2023-01-19 19:54:01 +02:00
Sebastian Dröge c03a6d0ea2 isomp4: Add stream-format = (string) obu-stream to AV1 caps
Anything else is not allowed in MP4.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3741>
2023-01-19 19:54:01 +02:00
Mathieu Duponchelle 903289613b qtmux: For video with N/1001 framerates use N as timescale instead of centiframes
This is recommended by various specifications for such framerates, while
for integer framerates we continue using centiframes to allow for some
more accuracy.

Using N means that no rounding error accumulates, eventually leading to
outputting a packet with a different duration.

Some tools such as MediaInfo determine that a stream is variable
framerate if any packet has a different duration than the others, and
there is no reason I can see for not using the full 4 bytes of
resolution that the mp4 timescale offers.

Example problematic pipeline:

```
videotestsrc num-buffers=5001 ! video/x-raw,framerate=60000/1001,width=320,height=240 ! \
videoconvert ! x264enc bitrate=80000 speed-preset=1 tune=zerolatency ! h264parse ! \
video/x-h264,profile=high-10 ! mp4mux ! filesink location="result2.mp4"
```

This results in a media file that MediaInfo detects as variable
framerate because the 5000th packet has duration 99 instead of 100.

With this patch, the timescale is 60000 and all packets have duration
1001.

Related issue for context: https://bugzilla.gnome.org/show_bug.cgi?id=769041

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3683>
2023-01-04 18:01:50 +00:00
Seungha Yang e2f30cd947 gtkbasesink: Fix widget leak
gst_gtk_base_sink_get_widget() will increase refcount and it should
be released after use

Fixing regression introduced by the commit
941c0e81dd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3650>
2022-12-28 11:46:14 +01:00
Seungha Yang d5086a1091 rtspsrc: Fix string leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3648>
2022-12-27 21:43:02 +01:00
Seungha Yang 620974352d rtptimerqueue: Fix memory leak
Should chain up to parent's finalize

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3648>
2022-12-27 21:43:02 +01:00
Matthias Fuchs 10fee807b9 qmlglsrc: Fix deadlock when stopping
This fix makes sure that streaming thread stops waiting when the
qmlglsrc element transitions from playing to paused.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3619>
2022-12-22 01:57:36 +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
Edward Hervey ec2f30c4db imagesequencesrc: Don't leak caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:19 +00:00
Nirbheek Chauhan 66ef101cf5 rtspsrc: Fix regression when using hostname in the location property
When the address can't be parsed as an IP address, it should just be
treated as a hostname and used as-is.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3596>
2022-12-18 18:16:16 +00:00
Nirbheek Chauhan 0b2db215e9 rtspsrc: Fix usage of IPv6 connections in SETUP
If the SETUP request returns an IPv6 server address in the Transport
field, we would generate an incorrect URI, and multiudpsink would fail
to initialize:

```
     rtspsrc gstrtspsrc.c:9780:dump_key_value:<source>    key: 'Transport', value: 'RTP/AVP;unicast;source=fe80::dc27:25ff:fe5e:bd13:8080;client_port=62696-62697;server_port=4000-4001'
...
     rtspsrc gstrtspsrc.c:4595:gst_rtspsrc_stream_configure_udp_sinks:<source> configure RTP UDP sink for fe80::dc27:25ff:fe5e:bd13:8080:4000
...
multiudpsink gstmultiudpsink.c:1229:gst_multiudpsink_configure_client:<udpsink0> error: Invalid address family (got 23)
```

We can't look at stream->is_ipv6 because we can't rely on the server
returning the right value there. In the issue reported about this,
server reported itself as `KuP RTSP Server/0.1`, and the SDP was:

```
c=IN IP4
m=video 54608 RTP/AVP 96
a=rtpmap:96 H264/90000
```

So we need to parse the string value and figure out the family
ourselves.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3596>
2022-12-18 18:15:26 +00:00
Nicolas Dufresne d9ebd9203c v4l2videodec: Fix activation of internal pool
If the driver does not support VIDIOC_CREATE_BUFS ioctl, the pool
configuration may get changed, which requires a validation. This would
fail to activate a pool in a case it shouldn't normally fail unless we
are out of memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2677>
2022-12-18 13:33:27 +00:00
A. Wilcox 9be676306d tests: Cast drop-messages-interval type properly
The rtpjitterbuffer test drop_messages_interval uses a GstClockTime for
the message drop interval.  This property is defined as a guint.  On
systems with 64-bit time_t but 32-bit uint, this can cause the
g_object_set function to fail to read the arguments properly.

Fixes: #1656
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3582>
2022-12-16 09:36:58 +00:00
Edward Hervey d729dbb717 oss4: Fix debug category initialization
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1456

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3577>
2022-12-15 21:08:48 +00:00
Bo Elmgreen b07f383ba6 qt: deactivate context if fill_info fails
Now the OpenGL context is deactivated if call to gst_gl_context_fill_info()
fails in gst_qt_get_gl_wrapcontext(), preventing that the context is left
activated, which could lead to invalid memory reads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3575>
2022-12-15 19:49:14 +00:00
Nicolas Dufresne e14daafdae v4l2src: Fix crash in renegotiation
This regression was introduce by fix for making buffer pool thread safe. When
we renegotiate, the pool will be setup after we set the format. But the code
has been simplified to only get the pool once before, which caused a null
pointer deref.

Fixes 94ba019 ("v4l2: Fix SIGSEGV on 'change state' during 'format change'")
Related to !3481
Fixes #1626

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3504>
2022-12-10 12:18:51 +00:00
Pawel Stawicki bcd127524f v4l2: Fix SIGSEGV on 'change state' during 'format change'
Ensure all access to v4l2object->pool imply taking a lock and a hard ref on the pool

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3504>
2022-12-10 12:18:51 +00:00
Jacek Skiba bd39e259e2 qtdemux: exit when protection caps are not defined during PIFF parsing
Reproduction testcase (uses PlayReady):
https://developers.canal-plus.com/rx-player/upc/?appTileLocation=[object%20Object]

In test streams we are using PIFF box, but caps did not had
present GST_PROTECTION_SYSTEM_ID_CAPS_FIELD. In consequence, invalid
system_id was returned which caused SIGSEGV crash.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3549>
2022-12-10 11:39:48 +00:00
Aleksandr Slobodeniuk ddf3bdd5cf rtspsrc: fix seek event leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3507>
2022-12-04 14:36:38 +00:00