audiodecoder: Fix gst_audio_decoder_get_audio_info return ownership GTK-Doc
authorAlejandro González <alejandro.gonzalez.correo@gmail.com>
Sat, 13 Feb 2021 17:24:37 +0000 (17:24 +0000)
committerAlejandro González <alejandro.gonzalez.correo@gmail.com>
Sat, 13 Feb 2021 17:24:37 +0000 (17:24 +0000)
commit2fd2540ea58ffaa62921e83977f1cc80b73f6802
treeb83909482e7606cbb26aa705fdaecfe0fc1460d4
parente1a8393ba7ec3c54649a288f1b1f51474d122394
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1032>
gst-libs/gst/audio/gstaudiodecoder.c