Skip to content

Commit b0f3661

Browse files
authored
Merge pull request #75 from restreamio/fix/gstaudioaggregator-structure-unref
Fix: add patch to fix a GstStructure unref in GstAudioAggregator
2 parents 3cd5f39 + 242b32c commit b0f3661

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

docker/build-gstreamer/compile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ git apply /compile-patch/0001-compositor-add-rounded-corners-property-for-sink-p
2929
git apply /compile-patch/0001-pad-Check-data-NULL-ness-when-probes-are-stopped-fixed-in-1.24.8.patch
3030
git apply /compile-patch/0001-Reduce-logs-verbosity-in-webrtcbin-when-a-FEC-decode.patch
3131
git apply /compile-patch/0001-glvideomixer-update-API-to-be-compatible-with-versio.patch
32+
git apply /compile-patch/0001-GstAudioAggregator-fix-structure-unref.patch
3233

3334
# This is needed for other plugins to be built properly
3435
ninja -C build install
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 4c5779845cb8dedf0797b78c382f8f0f8b0d19e2 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Lo=C3=AFc=20Le=20Page?= <llepage@igalia.com>
3+
Date: Wed, 18 Jun 2025 18:46:56 +0200
4+
Subject: [PATCH] GstAudioAggregator: fix structure unref in peek_next_sample
5+
6+
The GstStructure attached to the audio sample in peek_next_sample() was
7+
freed prematurely before usage as gst_sample_new() is taking full
8+
ownership on it.
9+
---
10+
.../gst-plugins-base/gst-libs/gst/audio/gstaudioaggregator.c | 1 -
11+
1 file changed, 1 deletion(-)
12+
13+
diff --git a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioaggregator.c b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioaggregator.c
14+
index d967a3295d..811e5e8a43 100644
15+
--- a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioaggregator.c
16+
+++ b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioaggregator.c
17+
@@ -2188,7 +2188,6 @@ gst_audio_aggregator_peek_next_sample (GstAggregator * agg,
18+
19+
sample = gst_sample_new (pad->priv->buffer, caps, &aggpad->segment, info);
20+
gst_caps_unref (caps);
21+
- gst_structure_free (info);
22+
}
23+
24+
return sample;
25+
--
26+
2.43.0
27+

0 commit comments

Comments
 (0)