Skip to content

Commit

Permalink
audioencoder: Fix gst_audio_encoder_get_audio_info return ownership G…
Browse files Browse the repository at this point in the history
…TK-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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1032>
  • Loading branch information
AlexTMjugador committed Feb 13, 2021
1 parent 2fd2540 commit 319da90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gst-libs/gst/audio/gstaudioencoder.c
Expand Up @@ -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)
Expand Down

0 comments on commit 319da90

Please sign in to comment.