From 2fd2540ea58ffaa62921e83977f1cc80b73f6802 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alejandro=20Gonz=C3=A1lez?= Date: Sat, 13 Feb 2021 17:24:37 +0000 Subject: [PATCH] audiodecoder: Fix gst_audio_decoder_get_audio_info return ownership GTK-Doc GTK-Doc specifies that, by default, the caller owns returned objects, so that the caller should free it 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/gstaudiodecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index ee32141..6742948 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -3271,7 +3271,7 @@ _gst_audio_decoder_error (GstAudioDecoder * dec, gint weight, * gst_audio_decoder_get_audio_info: * @dec: a #GstAudioDecoder * - * Returns: a #GstAudioInfo describing the input audio format + * Returns: (transfer none): a #GstAudioInfo describing the input audio format */ GstAudioInfo * gst_audio_decoder_get_audio_info (GstAudioDecoder * dec) -- 2.7.4