From 319da90d4cfdae6a5a84198d76a295dc8c162627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Sat, 13 Feb 2021 21:25:18 +0000 Subject: [PATCH] audioencoder: Fix gst_audio_encoder_get_audio_info return ownership GTK-Doc GTK-Doc specifies that, by default, the caller owns returned objects, so that the caller should free them when it is done. However, in the case of this function, the returned GstAudioInfo is owned by the decoder, so this default choice is incorrect. This creates double free problems when using GStreamer Rust bindings, because they are generated using the information contained in the docs. Fix this by correctly specifying that the caller does not own the returned object. Part-of: --- gst-libs/gst/audio/gstaudioencoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 5b9f7410c9..2a5192cd22 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -2150,7 +2150,7 @@ gst_audio_encoder_sink_activate_mode (GstPad * pad, GstObject * parent, * gst_audio_encoder_get_audio_info: * @enc: a #GstAudioEncoder * - * Returns: a #GstAudioInfo describing the input audio format + * Returns: (transfer none): a #GstAudioInfo describing the input audio format */ GstAudioInfo * gst_audio_encoder_get_audio_info (GstAudioEncoder * enc)