diff options
author | Philippe Normand <philn@igalia.com> | 2017-12-27 13:08:18 +0000 |
---|---|---|
committer | Philippe Normand <philn@igalia.com> | 2017-12-27 15:28:44 +0000 |
commit | 13363f2388a511c6fb0df18eabce7a13f36c1773 (patch) | |
tree | c221de13923dae781d7add385150c7f3ce0f75a9 /gst-libs | |
parent | 17121ebc579d1bdaa8fec379f6dcca5d2f098603 (diff) |
player: transfer ownership of info properties
The previous code would emit GObject critical warnings when the info properties
are NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=791982
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/player/gstplayer.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c index c6f0b018f..2b324267c 100644 --- a/gst-libs/gst/player/gstplayer.c +++ b/gst-libs/gst/player/gstplayer.c @@ -773,29 +773,25 @@ gst_player_get_property (GObject * object, guint prop_id, } case PROP_MEDIA_INFO:{ GstPlayerMediaInfo *media_info = gst_player_get_media_info (self); - g_value_set_object (value, media_info); - g_object_unref (media_info); + g_value_take_object (value, media_info); break; } case PROP_CURRENT_AUDIO_TRACK:{ GstPlayerAudioInfo *audio_info = gst_player_get_current_audio_track (self); - g_value_set_object (value, audio_info); - g_object_unref (audio_info); + g_value_take_object (value, audio_info); break; } case PROP_CURRENT_VIDEO_TRACK:{ GstPlayerVideoInfo *video_info = gst_player_get_current_video_track (self); - g_value_set_object (value, video_info); - g_object_unref (video_info); + g_value_take_object (value, video_info); break; } case PROP_CURRENT_SUBTITLE_TRACK:{ GstPlayerSubtitleInfo *subtitle_info = gst_player_get_current_subtitle_track (self); - g_value_set_object (value, subtitle_info); - g_object_unref (subtitle_info); + g_value_take_object (value, subtitle_info); break; } case PROP_VOLUME: |