Jan Alexander Steffens (heftig) [Tue, 10 Oct 2023 08:39:55 +0000 (10:39 +0200)]
tsmux: Fix default get_es_descrs_func
`tsmux_stream_default_get_es_descrs` is missing the `user_data`
parameter and shouldn't be cast to `TsMuxStreamGetESDescriptorsFunc`.
Prefer not casting at all to make sure we don't miss such an issue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
Jan Alexander Steffens (heftig) [Tue, 10 Oct 2023 08:22:44 +0000 (10:22 +0200)]
tsmux: Fix default new_stream_func
`tsmux_stream_new` is missing the `user_data` parameter and shouldn't be
cast to `TsMuxNewStreamFunc`.
Prefer not casting at all to make sure we don't miss such an issue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
Jan Alexander Steffens (heftig) [Tue, 10 Oct 2023 08:12:44 +0000 (10:12 +0200)]
tsmux: Add missing include
We need `GstMpegtsPMTStream` here.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
Jan Alexander Steffens (heftig) [Mon, 16 Oct 2023 22:57:56 +0000 (00:57 +0200)]
tsmux: Simplify tsmux_section_write_packet
- Don't try to make the parameters match `GHFunc`. Use a dedicated
callback for `g_hash_table_foreach`.
- Don't try to be clever with buffer memories. We're allocating a full
packet anyway, might as well memcpy and save on a lot of complexity.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
Jan Alexander Steffens (heftig) [Mon, 16 Oct 2023 22:54:38 +0000 (00:54 +0200)]
tsmux: tsmux_packet_out should always consume its buffer
Consuming the buffer only when successful is an antipattern and easily
leads to leaks.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
Jan Alexander Steffens (heftig) [Mon, 16 Oct 2023 21:54:20 +0000 (23:54 +0200)]
tsmux: Don't memset in pad_stream when writing a PCR packet
tsmux_write_ts_header will write a stuffing adaptation field, so we
don't need to prefill the buffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
Jan Alexander Steffens (heftig) [Mon, 16 Oct 2023 21:52:48 +0000 (23:52 +0200)]
tsmux: Move out parameters of tsmux_write_ts_header
Move them to the end of the parameter list and also allow passing NULLs
to ignore the payload information, but assert that the payload length is
zero in this case.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
Jan Alexander Steffens (heftig) [Mon, 16 Oct 2023 21:50:16 +0000 (23:50 +0200)]
tsmux: Fix two more uses of gst_buffer_map
The buffers should be used for writing.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
Matthias Fuchs [Tue, 17 Oct 2023 13:24:22 +0000 (15:24 +0200)]
qmlglsrc: sync on the streaming thread
After rendering a QML scene the qmlglsrc element copies the contents of
the scene to a GStreamer buffer. This happens on the Qt render thread.
Then it attaches a sync point to the destination buffer. This sync point
must be awaited by other threads which use the buffer later on. The
current implementation relies on the downstream elements to wait for the
sync point. However, there are situation where this does not work. The
GstBaseTransform e.g. copies the buffer metadata (which overwrites the
sync point without waiting for it) *before* waiting for the sync point.
This commit waits for the sync point inside the qmlglsrc element before
sending it downstream. The wait command is issued on the streaming
thread with the pipeline OpenGL context, i.e. it will synchronize with
the GStreamer OpenGL thread.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5515>
Jan Alexander Steffens (heftig) [Mon, 16 Oct 2023 13:41:48 +0000 (15:41 +0200)]
tsmux: Fix error handling in pad_stream
Don't leak the map or the buffer if we encounter an error.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5513>
Jan Alexander Steffens (heftig) [Mon, 16 Oct 2023 13:31:04 +0000 (15:31 +0200)]
tsmux: Fill padding packets with stuffing bytes
Instead of leaving it uncleared, emitting probably old packet data but
potentially also random or sensitive application data.
Also fix the mapping mode.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5513>
Nicolas Dufresne [Tue, 17 Oct 2023 18:56:34 +0000 (14:56 -0400)]
v4l2codecs: h265: Fix entry_point_offsets array leak
This array was being leaked.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5503>
Detlev Casanova [Tue, 17 Oct 2023 16:42:59 +0000 (12:42 -0400)]
codecs: h265: Do not free slice header before using it
The v4l2codecs H.265 decoder uses the
GstH265SliceHdr::entry_point_offset_minus1 array so make sure that it is not
freed before decoding the frame.
Before this patch, some H.265 input would segfault in
gst_v4l2_codec_h265_dec_fill_slice_params() when executing the line:
guint32 entry_point_offset = slice_hdr->entry_point_offset_minus1[i] + 1;
Make sure that the array is not freed before using it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5503>
Doug Nazar [Fri, 14 May 2021 02:25:55 +0000 (22:25 -0400)]
rtspclientsink: Don't leak previous server_ip
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5502>
Rahul T R [Thu, 12 Oct 2023 10:55:59 +0000 (16:25 +0530)]
kmssink: Add TIDSS auto-detection
Add Texas Instruments TIDSS display controller into list of
auto-detected modules.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5486>
Stéphane Cerveau [Thu, 12 Oct 2023 14:05:18 +0000 (16:05 +0200)]
imagesequencesrc: fix regular image deadlock
With one regular image file path provided (without %05d),
the element was stuck in a dead loop counting the frames:
gst_image_sequence_src_count_frames
This allows to display any image file out of the element
for a given number of buffers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5487>
Seungha Yang [Sun, 15 Oct 2023 11:30:22 +0000 (20:30 +0900)]
d3d11converter: Fix 10/12bits planar output
Simple division can result in 10/12bits overflow.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5484>
Seungha Yang [Wed, 11 Oct 2023 17:26:07 +0000 (02:26 +0900)]
d3d11videosink: Fix rendering with initial fullscreen state
Change fullscreen mode once the swapchain is fully configured
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5466>
Seungha Yang [Wed, 11 Oct 2023 14:29:04 +0000 (23:29 +0900)]
d3d11videosink: Fix toggling between fullscreen and maximized
Use GetWindowPlacement() and SetWindowPlacement() APIs
to remember and restore window status, such as maximized, position,
restore position, etc.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3016
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5466>
Guillaume Desmottes [Wed, 11 Oct 2023 12:47:33 +0000 (14:47 +0200)]
flvmux: set the src segment position as running time
We were already converting the pad last timestamp to running time but
not the segment position.
This segment position is used by gst_aggregator_simple_get_next_time()
to compute the waiting time when aggregating.
Those waiting times were wrong in my live pipeline using the system
clock, resulting in the aggregator to never wait at all.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5465>
Nicolas Dufresne [Wed, 11 Oct 2023 13:36:11 +0000 (09:36 -0400)]
v4l2: Fix tiled formats stride conversion
While adding arbitrary tile support, a round up operation was badly
converter. This caused the Y component of the stride to be 0. This
eventually lead to a crash in glupoad preceded by the following
assertion.
gst_gl_buffer_allocation_params_new: assertion 'alloc_size > 0' failed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5463>
Nicolas Dufresne [Tue, 10 Oct 2023 19:43:07 +0000 (15:43 -0400)]
v4l2codecs: Fix tiled formats stride conversion
While adding arbitrary tile support, a round up operation was badly
converter. This caused the Y component of the stride to be 0. This
eventually lead to a crash in glupoad preceded by the following
assertion.
gst_gl_buffer_allocation_params_new: assertion 'alloc_size > 0' failed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5463>
Piotr Brzeziński [Mon, 9 Oct 2023 12:48:35 +0000 (14:48 +0200)]
glfilter: Only add parent meta if inbuf != outbuf
This was causing a memory leak in cases like `gltestsrc ! gltransformation scale-x=0.5 ! glimagesink`.
Parent meta was being added in assumption that those buffers are different, which was not the case here,
creating a reference loop and never freeing the buffer.
Co-authored-by: Matthew Waters <matthew@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5453>
Seungha Yang [Mon, 9 Oct 2023 10:09:15 +0000 (19:09 +0900)]
decklink: Fix broken COM string conversion
WideCharToMultiByte return is the string length without null terminate
character if passed "cchWideChar" does not include the null terminate
character size. Instead of passing the exact string length, pass -1 so that
the API can understand the input string is null terminated already and
returned value from the API includes the character.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3023
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5446>
James Oliver [Thu, 5 Oct 2023 05:34:14 +0000 (13:34 +0800)]
nvh265encoder: fix bounds for auto-select GPU enumeration
Fixes the bounds-check for encoder auto-select GPU enumeration to be
between 0-7 instead of 0-6. This should allow 8-GPU machines to work
with nvautogpuh265enc for the last enumerated GPU.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5439>
James Oliver [Thu, 5 Oct 2023 05:29:49 +0000 (13:29 +0800)]
nvh264encoder: fix bounds for auto-select GPU enumeration
Fixes the bounds-check for encoder auto-select GPU enumeration to be
between 0-7 instead of 0-6. This should allow 8-GPU machines to work
with nvautogpuh264enc for the last enumerated GPU.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5439>
Sebastian Dröge [Thu, 28 Sep 2023 15:03:31 +0000 (18:03 +0300)]
flacenc: Correctly handle up to 255 cue entries
The counter was using a signed 8 bit integer, which was overflowing
after 127 entries. That was then passed as an unsigned 32 bit integer to
libflac, which caused it to be converted to a huge unsigned number.
That then caused an invalid memory access inside libflac.
As a bonus, signed integer overflow is undefined behaviour.
Instead, use an unsigned 8 bit integer. Once this overflows the existing
code already catches it and stops adding the cue. While FLAC__metadata_object_cuesheet_insert_track()
takes an unsigned 32 bit integer for the track number, FLAC__StreamMetadata_CueSheet_Track is
limiting it to an unsigned 8 bit integer.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2921
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5436>
Philippe Normand [Wed, 27 Sep 2023 10:33:39 +0000 (12:33 +0200)]
interaudiosink: Ensure adapters don't store buffers with audio meta
The interaudiosrc might take buffers of different sizes from the audio adapter,
so keeping metas consistency would be an issue. So the sink now strips the audio
metas away and the src adds them back (for non-interleaved layouts only) when
taking buffers from the adapter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5416>
Philippe Normand [Wed, 13 Sep 2023 14:11:32 +0000 (15:11 +0100)]
interaudiosrc: Add audio meta to buffers containing non-interleaved samples
Without this a downstream audioconverter wouldn't be able to map the
GstAudioBuffer prior to conversion.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5416>
Florian Zwoch [Tue, 26 Sep 2023 16:48:10 +0000 (16:48 +0000)]
adaptivedemux2: Call GTasks's return functions for blocking tasks
Gio/Task states the following:
If a GTask has been constructed and its callback set, it is an error to
not call g_task_return_*() on it. GLib will warn at runtime if this
happens (since 2.76).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5414>
Albert Sjölund [Wed, 27 Sep 2023 06:48:03 +0000 (08:48 +0200)]
souphttpsrc: Chain finalize call to parent
GstSoupSession finalize does not chain parent finalize,
causing it to leak memory, shown under g freeze notify.
In finalize method, ensure all branches call to parent
finalize.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5402>
Seungha Yang [Tue, 26 Sep 2023 16:12:01 +0000 (01:12 +0900)]
d3d11decoder: Fix crash on negotiate() when decoder is not configured
The negotiate() can be called by GstVideoDecoder baseclass on GAP event,
and decoder helper object might not be configured at the time
when negotiate() is called.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5401>
Hou Qi [Fri, 22 Sep 2023 07:57:28 +0000 (16:57 +0900)]
v4l2videodec: Correctly free caps to avoid memory leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5388>
Eric [Thu, 21 Sep 2023 12:12:47 +0000 (08:12 -0400)]
rtspconnection: Ignore trailing whitespace in headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5382>
Michiel Westerbeek [Wed, 20 Sep 2023 14:07:35 +0000 (16:07 +0200)]
video-scaler, audio-resampler: downgrade 'can't find exact taps' to debug
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5381>
Tim-Philipp Müller [Wed, 20 Sep 2023 18:41:00 +0000 (19:41 +0100)]
Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5371>
Tim-Philipp Müller [Wed, 20 Sep 2023 17:10:57 +0000 (18:10 +0100)]
Release 1.22.6
Sebastian Dröge [Thu, 10 Aug 2023 12:47:03 +0000 (15:47 +0300)]
mxfdemux: Check number of channels for AES3 audio
Only up to 8 channels are allowed and using a higher number would cause
integer overflows when copying the data, and lead to out of bound
writes.
Also check that each buffer is at least 4 bytes long to avoid another
overflow.
Fixes ZDI-CAN-21661, CVE-2023-40475
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2897
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5365>
Sebastian Dröge [Thu, 10 Aug 2023 12:45:01 +0000 (15:45 +0300)]
mxfdemux: Fix integer overflow causing out of bounds writes when handling invalid uncompressed video
Check ahead of time when parsing the track information whether
width, height and bpp are valid and usable without overflows.
Fixes ZDI-CAN-21660, CVE-2023-40474
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2896
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5365>
Nicolas Dufresne [Wed, 9 Aug 2023 16:49:19 +0000 (12:49 -0400)]
h265parser: Fix possible overflow using max_sub_layers_minus1
This fixes a possible overflow that can be triggered by an invalid value of
max_sub_layers_minus1 being set in the bitstream. The bitstream uses 3 bits,
but the allowed range is 0 to 6 only.
Fixes ZDI-CAN-21768, CVE-2023-40476
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2895
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5366>
Hugues Fruchet [Mon, 11 Sep 2023 16:12:28 +0000 (18:12 +0200)]
waylandsink: Fix cropping for video with non-square aspect ratio
Padding of unaligned content is still visible at right with some aspect-ratio.
Fix this by giving the original content resolution to wp_viewport_set_source()
instead of pixel aspect ratio scaled one.
Fixes !5259
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5360>
Olivier Blin [Tue, 19 Sep 2023 07:14:31 +0000 (09:14 +0200)]
pulsedeviceprovider: fix incorrect usage of GST_ELEMENT_ERROR
The provider is not a GStreamer element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5354>
Seungha Yang [Wed, 13 Sep 2023 16:18:59 +0000 (01:18 +0900)]
h264decoder: Update latency dynamically
The actual number of reorder frames is unknown
unless frame reordering is disabled
(e.g., POC type 2 or constrained-* profiles).
Also derived maximum DPB size or max_num_reorder_frames in VUI
is not the upper bound of output delay.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2702
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5341>
L. E. Segovia [Wed, 16 Aug 2023 13:43:56 +0000 (13:43 +0000)]
applemedia: Also fix inconsistent pixel format definition for NV12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5203>
L. E. Segovia [Tue, 15 Aug 2023 21:45:56 +0000 (21:45 +0000)]
applemedia: Fix pixel format for I420
In Intel Macs, using full range 8-bit 4:2:0 YCbCr results in a failure on
initialization. I've validated this to be the correct pixel format with FFmpeg:
https://github.com/FFmpeg/FFmpeg/blob/
8653dcaf7d665b15b40ea9a560c8171b0914a882/libavutil/hwcontext_videotoolbox.c#L45
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5203>
Víctor Manuel Jáquez Leal [Thu, 24 Aug 2023 10:12:09 +0000 (12:12 +0200)]
va: Fix in error logs functions mismatches
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5340>
Matthew Waters [Fri, 15 Sep 2023 01:06:52 +0000 (11:06 +1000)]
androidmedia/enc: handle codec-data before popping GstVideoCodecFrames
Issue is that when amc was producing a codec-data buffer, a
GstVideoCodecFrame was being popped off the internal queue. This meant
that the codec-data was being associated with the first input frame and
the second (first encoded buffer) output buffer with the second input
frame. At the end (assuming one input produces one output which seems
to hold in my testing and how the encoder is currently implemented)
there would be an input frame missing and would be pushed without any
timing information. This would lead to e.g. muxers rejecting the buffer
without PTS and failing to mux.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5335>
Matthew Waters [Fri, 15 Sep 2023 01:06:07 +0000 (11:06 +1000)]
androidmedia/enc: add fixme log about partial frames
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5335>
Seungha Yang [Fri, 15 Sep 2023 18:13:33 +0000 (03:13 +0900)]
av1parser: Fix segmentation params update
Even if the segmentation feature value is not updated,
the parsed "segmentation_update_map" and "segmentation_temporal_update"
values should not be cleared as it's referenced during lower
level bitstream parsing. Also, don't use assert() in parser
unless it's clearly impossible condition.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5336>
Jan Alexander Steffens (heftig) [Thu, 24 Aug 2023 15:40:42 +0000 (17:40 +0200)]
rtmp2: Allow NULL flash version, omitting the field
rtmpsink omits it by default. Allow us to do the same.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5248>
Thomas Schneider [Tue, 5 Sep 2023 12:15:04 +0000 (14:15 +0200)]
androidmedia: fix hevc codec profile registration
Fix the codec registration logic such that all supported
profiles are available instead of just the first in the
list.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5313>
Nicolas Dufresne [Tue, 5 Sep 2023 20:56:44 +0000 (16:56 -0400)]
v4l2: object: Handle video helper return value
gst_video_info_set_interlaced_format() can return an error if the
width/height causes integer overflow. Handle this case, so that we can
fail cleanly. This has been experienced while testing an in-progress
driver.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5319>
Nicolas Dufresne [Tue, 5 Sep 2023 20:51:24 +0000 (16:51 -0400)]
v4l2: bufferpool: Avoid warnings on empty last buffer
Some drivers will push an buffer flagged LAST but empty. In decoder
case, this results in an "producing too many buffer" warning, even
though the result is entirely correct. Detect this case in order to
signal EOS earlier and avoid this warning.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5319>
Nicolas Dufresne [Tue, 5 Sep 2023 20:15:19 +0000 (16:15 -0400)]
v4l2: bufferpool: Do not resize compressed buffer
Avoid resizing compressed buffer to their maximum size. This fixes a
regression that caused valid but very large streams to be generated.
Fixes #2953
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5319>
Sebastian Dröge [Thu, 7 Sep 2023 14:23:37 +0000 (17:23 +0300)]
rtpjitterbuffer: Avoid integer overflow in max saveable packets calculation with negative offset
The timestamp offset can be negative, and it can be a bigger negative
number than the latency introduced by the rtpjitterbuffer so the overall
timeout offset can be negative.
Using the negative offset for calculating how many packets can still
arrive in time when encountering a lost packet in an equidistant stream
would then overflow and instead of considering fewer packets lost a lot
more packets are considered lost.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5318>
Akihiro Sagawa [Sun, 3 Sep 2023 13:21:30 +0000 (13:21 +0000)]
codecparsers: Fix MPEG-1 aspect ratio table
The values defined in ISO/IEC 11172-2 are different from those used so far.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5300>
Nirbheek Chauhan [Wed, 30 Aug 2023 10:56:07 +0000 (16:26 +0530)]
macos-bison: Update to 3.8.2 and add an ARM64 build
Also includes a shell script to build bison and match pycodestyle.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5299>
Nicolas Dufresne [Tue, 29 Aug 2023 18:55:03 +0000 (14:55 -0400)]
waylandsink: Crop surfaces to their display width height
Setting the surface source rectangle has been omitted so far. As a side effect
surface created with padded width/height are being scaled down. Fix this using
the viewporter source rectangle configuration. This can later be enhanced
to support crop meta.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5298>
Seungha Yang [Mon, 28 Aug 2023 11:58:22 +0000 (20:58 +0900)]
d3d11convert: Passthrough allocation query on same caps
Since d3d11convert and its variant elements does not enable basetransform's
passthrough, passthrough allocation query needs to be handled
manually in order to respect downstream element's min/max buffer
requirement.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5297>
Stephan Seitz [Sat, 26 Aug 2023 13:12:05 +0000 (15:12 +0200)]
sdp: fix wrong error message for missing clock-rate in caps
When using `gst_sdp_media_set_media_from_caps` on `application/x-rtp` caps
without `clock-rate` it wrongly reports missing payload type even if `payload`
is present in the caps.
This seems to be a copy&paste error from the error message for missing payload
type.
When using payload=10, both `clock-rate` and some other media properties are
defined by the RTP standard so I was wondering whether I could omit `clock-rate`
and was confused about the error message.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5252>
Seungha Yang [Wed, 23 Aug 2023 10:27:43 +0000 (19:27 +0900)]
nvencoder: Fix negotiation error when interlace-mode is unspecified
Use GST_PAD_SET_ACCEPT_INTERSECT() to accept caps without interlace-mode
field
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5240>
Seungha Yang [Wed, 23 Aug 2023 09:07:31 +0000 (18:07 +0900)]
win32ipc: Fix pipe handle leak
Named pipe handle must be closed if it's no longer needed
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2923
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5231>
Seungha Yang [Mon, 21 Aug 2023 17:57:24 +0000 (02:57 +0900)]
h265parse: Allow partially broken hvcC data
Ignores parsing error on the last nalu of the array if the nalu type
is not VPS/SPS/PPS
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2905
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5220>
Ming Qian [Tue, 22 Aug 2023 01:57:14 +0000 (09:57 +0800)]
v4l2object: clear format lists if source change event is received
If decoder notify a source change event when the capture format is
changed, not the resolution changed.
then gst_v4l2_object_acquire_format will retuen false due to
unsupported format.
we need to clear the format lists in the source change flow,
and reenumerate format list
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5223>
Nicolas Dufresne [Tue, 25 Jul 2023 19:14:11 +0000 (15:14 -0400)]
v4l2: allocator: Don't close foreign dmabuf
Imported dmabuf are not being duped, so they should never be closed. Instead,
we ensure their live time by having strong reference on their original
buffer. This should fix potential flickering due to dmabuf being closed
too early.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5217>
Jan Schmidt [Fri, 18 Aug 2023 15:00:16 +0000 (01:00 +1000)]
audio: Make sure to stop ringbuffer on error
Add gst_audio_ring_buffer_set_errored() that will mark the
ringbuffer as errored only if it is currently started or paused,
so gst_audio_ringbuffer_stop() can be sure that the error
state means that the ringbuffer was started and needs stop called.
Fixes a crash with osxaudiosrc if the source element posts
an error, because the ringbuffer would not get stopped and CoreAudio
would continue trying to do callbacks.
Also, anywhere that modifies the ringbuffer state, make sure to
use atomic operations, to guarantee their visibility
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5216>
Jan Schmidt [Fri, 18 Aug 2023 08:21:18 +0000 (18:21 +1000)]
mdns: Fix a crash on context error
Make sure not to free the microdns provider context until the
device provider asks it to stop. Fixes a crash if there is
an error (such as MDNS port being busy) that makes the
mdns listener exit early.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5207>
Tim-Philipp Müller [Tue, 28 Mar 2023 18:58:30 +0000 (19:58 +0100)]
tools: gst-inspect: print action signals as emit_by_name() invocations
It's quite confusing to print a function callback signature for
action signals when people need to do a g_signal_by_name() invocation
in order to use this feature. Requires too much background knowledge
about how GObject works under the hood to make sense of that.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5206>
Tim-Philipp Müller [Wed, 29 Mar 2023 15:46:43 +0000 (16:46 +0100)]
tools: gst-inspect: prettify type names for strings
'gchararray' and 'GStrv' are not types used anywhere else
and are just confusing. Map that to 'const gchar *' and 'gchar *'
etc. depending on context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5206>
Tim-Philipp Müller [Tue, 28 Mar 2023 18:56:14 +0000 (19:56 +0100)]
tools: gst-inspect: add vertical spacing between properties and signals
Makes it easier to read and less squashed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5206>
Piotr Brzeziński [Tue, 15 Aug 2023 14:01:28 +0000 (16:01 +0200)]
tools: Disable fault signal handlers in gst-launch/gst-validate on macOS
By default, macOS attempts to run lldb against a misbehaving process to handle the crash. This does not play well
with the SISEGV/SIGQUIT handler we add in gst-launch/gst-validate. The 'spinning' mechanism causes the lldb
and debugserver processes ran by macOS to misbehave, taking 100% CPU and rendering both themselves and the GStreamer
instance frozen and very hard to effectively kill. macOS's Activity Monitor is also unusable while this is happening.
This patch takes the quickest possible solution of just disabling those signal handlers entirely on macOS.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5201>
Guillaume Desmottes [Fri, 18 Aug 2023 07:27:36 +0000 (09:27 +0200)]
rtmp2sink: fix crash if message conversion failed
The message pointer is not set so we can't display it in logs.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5202>
Jan Alexander Steffens (heftig) [Thu, 20 Jul 2023 17:13:36 +0000 (19:13 +0200)]
qt: Unbreak build with qt-egl enabled but viv_fb missing
Avoids an error message when the feature is explicitly enabled:
ERROR: Feature qt-egl cannot be enabled: gstreamer-gl-viv_fb-1.0 is required
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5200>
Olivier Crête [Wed, 9 Aug 2023 21:35:39 +0000 (17:35 -0400)]
sdpmessage: Parse zero clock-rate as default
It seems there is at least one broken RTSP server out there that returns a clock-rate of 0.
Let's just ignore it and use the default in that case.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5199>
Wang Chuan [Mon, 7 Aug 2023 06:18:21 +0000 (14:18 +0800)]
gstadaptivedemux: fix memory leak
GstQuery leaks when using invalid url
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5156>
Seungha Yang [Mon, 7 Aug 2023 16:29:40 +0000 (01:29 +0900)]
hlssink2: Always use forward slash separator
g_build_filename() will insert back slash on Windows, and resulting
playlist will contain media segment path with back slash if
"playlist-root" property is specified
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5161>
Jan Schmidt [Fri, 4 Aug 2023 15:39:29 +0000 (01:39 +1000)]
audiolatency: Fix event refcounting bug handling latency events
Fix a refcounting bug introduced in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5146
If upstream returns FALSE when processing a latency event, it will
be unreffed an extra time
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5152>
Jan Schmidt [Fri, 4 Aug 2023 07:25:26 +0000 (17:25 +1000)]
audiolatency: Forward latency query and event upstream
Make sure the pipeline still configures the latency that it would configure
if audiolatency was not in the pipeline.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5152>
Nirbheek Chauhan [Fri, 4 Aug 2023 09:41:05 +0000 (15:11 +0530)]
meson: Fix searching of qt5/qt6 tools with qmake
If the pkg-config files are broken, we want to ensure that qmake is
used. This can easily happen on macOS with the official Qt binaries.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5149>
Ryan Pavlik [Wed, 19 Jul 2023 23:08:32 +0000 (18:08 -0500)]
androidmedia: Add more null checks (of env) to JNI utilities
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5142>
Alicia Boya García [Wed, 12 Jul 2023 10:37:34 +0000 (12:37 +0200)]
qtdemux: Fix premature EOS when some files are played in push mode
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2771
This EOS branch exists so that if a seek with a stop is made, qtdemux
stops accepting bytes from the sink after the entire requested playback
range is demuxed, as otherwise we could keep download content that is
not being used.
This patch fixes two flaws that were present in that EOS check:
1) A comparison was made between track time and movie time without conversion.
This made the check trigger early in files with edit lists. This patch fixes
this by converting the track PTS to movie PTS (stream time) for the check.
2) To avoid sending a EOS prematurely when the segment stop is within a GOP and
B-frames are present, the check for EOS should only be done for keyframes. I
gather this was already the intention with the existing code, but because it
used `stream->on_keyframe` instead of the local variable `keyframe` the old
code was checking if the *previous* frame was a keyframe.
It's interesting to note that these two flaws in the old code mask each other
in most cases: the track PTS will have reached the movie end PTS, but EOS would
only be sent if the previous frame was a keyframe. A simple case where they
wouldn't mask each other, reproducing the bug, is a sequence of 3 frame GOPs
with structure I-B-P.
The following validateflow tests have been added to future-proof the
fix:
* validate.test.mp4.qtdemux_ibpibp_non_frag_pull.default
* validate.test.mp4.qtdemux_ibpibp_non_frag_push.default
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5114>
Philippe Normand [Sat, 22 Jul 2023 09:42:39 +0000 (10:42 +0100)]
transcodebin: Fixes for upstream selectable support
The upstream selectable query was not performed in all situations where we
handle the stream-start event. This could potentially lead to unlinked pads
between decodebin3 and encodebin later on.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5141>
Ryan Pavlik [Wed, 19 Jul 2023 23:08:32 +0000 (18:08 -0500)]
androidmedia: Add more null checks to JNI utilities
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5136>
Ryan Pavlik [Fri, 28 Jul 2023 19:02:22 +0000 (14:02 -0500)]
androidmedia: Fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5136>
Ryan Pavlik [Wed, 19 Jul 2023 23:08:16 +0000 (18:08 -0500)]
androidmedia: Clear err if we don't have an optional camera field/constant
Fixes startup on devices where those fields/constants are not found.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5136>
Ryan Pavlik [Wed, 26 Jul 2023 21:45:18 +0000 (16:45 -0500)]
webrtc: Fix docs for create-data-channel action signal
Initial line of the doc comment was incorrect, so the nicely written
docs were not being extracted.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5134>
Philippe Normand [Tue, 1 Aug 2023 14:14:29 +0000 (15:14 +0100)]
decodebin3: Ensure the slot is unlinked before linking to decoder
When switching from a raw stream to an encoded stream we need to make sure the
slot is unlinked, there is code in place for this but it wasn't triggered
because the slot being reconfigured wasn't advertised as linked beforehand.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5133>
Nicolas Dufresne [Thu, 22 Jun 2023 14:10:43 +0000 (10:10 -0400)]
v4l2: Fix support for left and top padding
In the current implementation, we support for most pixel format left
and top padding by changing the offset in the video meta. Though, to
align driver bytesused to the offset, we recalculate the offset, which
removed the modification we did before.
Instead, save the plane size, and truncate the driver reported bytesused
to the expected size, which ensures that the offsets still match. This
should also fix issues were the buffer size ended up bigger then the
pool size due to driver introduced padding.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5132>
Guillaume Desmottes [Tue, 25 Jul 2023 13:15:58 +0000 (15:15 +0200)]
videoflip: fix concurrent access when modifying the tag list
We were checking if the tag list is writable, but it may actually be
shared through the same event (tee upstream or multiple consumers).
Fix a bug where multiple branches have a videoflip element checking the
taglist. The first one was changing the orientation back to rotate-0
which was resetting the other instances.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5099>
Xabier Rodriguez Calvar [Fri, 21 Jul 2023 10:48:08 +0000 (12:48 +0200)]
qtdemux: attach cbcs crypt info at the right moment
Before it was always added but that can cause issues when the stream begins
unencrypted.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5096>
Nirbheek Chauhan [Fri, 14 Jul 2023 02:58:10 +0000 (08:28 +0530)]
meson: Ensure that soup plugin is built on Windows
The libpsl subproject wasn't building successfully and CI didn't
notice because:
1. The plugin wasn't explicitly enabled
2. Even when the plugin is explicitly enabled, the dep is not required
at build time when not building a static plugin
So fix all of these issues.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Nirbheek Chauhan [Wed, 12 Jul 2023 07:11:23 +0000 (12:41 +0530)]
libpsl.wrap: Fix MSYS2 build failure
Also switch from git repo to tarball.
https://github.com/rockdaboot/libpsl/pull/211
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Tim-Philipp Müller [Thu, 26 Jan 2023 20:42:41 +0000 (21:42 +0100)]
ci: use meson 1.1.1 in the 1.22 branch Windows CI
We need diff_files support for Meson wraps on the Windows
CI for the libpsl wrap which is only available since
Meson 0.63.
We leave the Fedora Meson version on 0.62 so that we
still cover that too since it's our minimum requirement.
Only the image prepare script is updated for now, but the
image tag is not bumped on purpose, since the 1.22 branch
has very low activity and building and uploading/distributing
a new image is fairly expensive. For now we just update the
meson version in the Windows jobs directly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Stéphane Cerveau [Tue, 20 Jun 2023 10:31:40 +0000 (11:31 +0100)]
libxml2: update to 2.10.3-4
The previous version was failing to configure due to
```
"Dependencies must be external dependencies"
```
on zlib
Fixed by https://github.com/mesonbuild/wrapdb/pull/865/files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Stéphane Cerveau [Mon, 19 Jun 2023 15:12:22 +0000 (17:12 +0200)]
wrap: add libpsl patch to fix win build
These patches are necessary for Windows build since
0.21.2
See
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Stéphane Cerveau [Fri, 16 Jun 2023 08:58:53 +0000 (10:58 +0200)]
wrap: update libpsl to 0.21.2
On macos, the build is failing with 0.21.1,
a patch has been landed to fix the issue, see
https://github.com/rockdaboot/libpsl/pull/166
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Haihua Hu [Thu, 18 May 2023 08:08:03 +0000 (16:08 +0800)]
decodebin3: avoid identity, sinkpad, parsebin leakage when reset input
when reset_input, need remove identity/parsebin from decodebin3
when release_pad, need call free or reset input if collection
didn't change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5086>
Tim-Philipp Müller [Thu, 20 Jul 2023 15:57:47 +0000 (16:57 +0100)]
Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5082>
Tim-Philipp Müller [Thu, 20 Jul 2023 14:22:48 +0000 (15:22 +0100)]
Release 1.22.5
Ruslan Khamidullin [Tue, 18 Jul 2023 01:25:47 +0000 (01:25 +0000)]
video: add extensive tests for gst_video_time_code_is_valid()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5061>