[gthumb] gstreamer utils: unref the sample only if the pixbuf was not created
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] gstreamer utils: unref the sample only if the pixbuf was not created
- Date: Sat, 22 May 2021 08:27:39 +0000 (UTC)
commit 0641e75e8623bf7bc7e6f510a3c9549f4469f841
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri May 21 08:08:42 2021 +0200
gstreamer utils: unref the sample only if the pixbuf was not created
extensions/gstreamer_utils/gstreamer-utils.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/extensions/gstreamer_utils/gstreamer-utils.c b/extensions/gstreamer_utils/gstreamer-utils.c
index 83812100..bcc27ccd 100644
--- a/extensions/gstreamer_utils/gstreamer-utils.c
+++ b/extensions/gstreamer_utils/gstreamer-utils.c
@@ -797,10 +797,11 @@ _gst_playbin_get_current_frame (GstElement *playbin,
gst_memory_unref (memory);
}
- if (data->pixbuf == NULL)
+ if (data->pixbuf == NULL) {
+ gst_sample_unref (sample);
g_warning ("Could not take screenshot: %s", "could not create pixbuf");
+ }
- gst_sample_unref (sample);
screenshot_data_finalize (data);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]