summaryrefslogtreecommitdiff
path: root/src/totem-video-thumbnailer.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-03-13 12:04:23 +0100
committerBastien Nocera <hadess@hadess.net>2013-03-13 12:05:25 +0100
commita48aa2211a3c98508fc3ad40cf0bea3d522378d7 (patch)
tree35bca86427288a116141a9193963af3f3560627e /src/totem-video-thumbnailer.c
parent799c585683c63a43e51f76f66f8e5cf76fa658d2 (diff)
downloadtotem-a48aa2211a3c98508fc3ad40cf0bea3d522378d7.tar.gz
thumbnailer: Use g_clear_object
Diffstat (limited to 'src/totem-video-thumbnailer.c')
-rw-r--r--src/totem-video-thumbnailer.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/totem-video-thumbnailer.c b/src/totem-video-thumbnailer.c
index 16c427d9a..48d5862ee 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;