[totem] thumbnailer: Use g_clear_object
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] thumbnailer: Use g_clear_object
- Date: Wed, 13 Mar 2013 11:06:37 +0000 (UTC)
commit a48aa2211a3c98508fc3ad40cf0bea3d522378d7
Author: Bastien Nocera <hadess hadess net>
Date: Wed Mar 13 12:04:23 2013 +0100
thumbnailer: Use g_clear_object
src/totem-video-thumbnailer.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/src/totem-video-thumbnailer.c b/src/totem-video-thumbnailer.c
index 16c427d..48d5862 100644
--- a/src/totem-video-thumbnailer.c
+++ b/src/totem-video-thumbnailer.c
@@ -179,8 +179,7 @@ static void
thumb_app_cleanup (ThumbApp *app)
{
gst_element_set_state (app->play, GST_STATE_NULL);
- g_object_unref (app->play);
- app->play = NULL;
+ g_clear_object (&app->play);
}
static void
@@ -656,12 +655,8 @@ capture_interesting_frame (ThumbApp *app)
/* If we get to the end of this loop, we'll end up using
* the last image we pulled */
- if (current + 1 < G_N_ELEMENTS(frame_locations)) {
- if (pixbuf != NULL) {
- g_object_unref (pixbuf);
- pixbuf = NULL;
- }
- }
+ if (current + 1 < G_N_ELEMENTS(frame_locations))
+ g_clear_object (&pixbuf);
PROGRESS_DEBUG("Frame for iter %d was not interesting", current);
}
return pixbuf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]