diff options
author | Dave Robillard <dave@drobilla.net> | 2009-07-03 20:01:36 -0400 |
---|---|---|
committer | Dave Robillard <dave@drobilla.net> | 2009-07-03 20:01:36 -0400 |
commit | e289c875a5e0ee56dd8289e78b63f36f709b6534 (patch) | |
tree | 9bd2b450261bbc0fa522bf27d9a89d017308687e /gst/camerabin/camerabinpreview.c | |
parent | ed06ed3b658b49b1313df38909bcb2f907be83a7 (diff) | |
parent | caba48f261421d397900471b19350da2e5a4a4e5 (diff) | |
download | gst-plugins-bad-e289c875a5e0ee56dd8289e78b63f36f709b6534.tar.gz gst-plugins-bad-e289c875a5e0ee56dd8289e78b63f36f709b6534.tar.bz2 gst-plugins-bad-e289c875a5e0ee56dd8289e78b63f36f709b6534.zip |
Merge branch 'fdo' into lv2
Diffstat (limited to 'gst/camerabin/camerabinpreview.c')
-rw-r--r-- | gst/camerabin/camerabinpreview.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gst/camerabin/camerabinpreview.c b/gst/camerabin/camerabinpreview.c index b64b2143..9b12bbac 100644 --- a/gst/camerabin/camerabinpreview.c +++ b/gst/camerabin/camerabinpreview.c @@ -183,7 +183,7 @@ gst_camerabin_preview_convert (GstCameraBin * camera, GstBuffer * buf) if (!src || !sink) { GST_WARNING ("pipeline doesn't have src / sink elements"); - goto no_pipeline; + goto missing_elements; } g_object_set (src, "size", (gint64) GST_BUFFER_SIZE (buf), @@ -234,6 +234,7 @@ gst_camerabin_preview_convert (GstCameraBin * camera, GstBuffer * buf) g_return_val_if_reached (NULL); } } + gst_message_unref (msg); } else { g_warning ("Could not make preview image: %s", "timeout during conversion"); result = NULL; @@ -245,9 +246,21 @@ gst_camerabin_preview_convert (GstCameraBin * camera, GstBuffer * buf) GST_BUFFER_FLAGS (buf) = bflags; +done: + if (src) + gst_object_unref (src); + if (sink) + gst_object_unref (sink); + return result; /* ERRORS */ +missing_elements: + { + g_warning ("Could not make preview image: %s", + "missing elements in pipeline (unknown error)"); + goto done; + } no_pipeline: { g_warning ("Could not make preview image: %s", |