summaryrefslogtreecommitdiff
path: root/gst/faceoverlay
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2012-03-15 18:26:24 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2012-03-15 18:26:24 +0000
commit3f07ebcc37b77ee7c39f964aab6e207eb7ff028f (patch)
treeeebfed2e17b40d633c26b1075fb174061a37d6fb /gst/faceoverlay
parent36a6a13f1c3a113b9a68dbd5362072ed937f7a13 (diff)
downloadgstreamer-plugins-bad-3f07ebcc37b77ee7c39f964aab6e207eb7ff028f.tar.gz
faceoverlay: clear overlay if the face disappears
Diffstat (limited to 'gst/faceoverlay')
-rw-r--r--gst/faceoverlay/gstfaceoverlay.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/faceoverlay/gstfaceoverlay.c b/gst/faceoverlay/gstfaceoverlay.c
index 9695f0aef..67bd96ee4 100644
--- a/gst/faceoverlay/gstfaceoverlay.c
+++ b/gst/faceoverlay/gstfaceoverlay.c
@@ -211,9 +211,14 @@ gst_face_overlay_handle_faces (GstFaceOverlay * filter, GstStructure * s)
face_count = gst_value_list_get_size (faces_list);
GST_LOG_OBJECT (filter, "face count: %d", face_count);
- /* FIXME: should we clear the overlay in this case? */
- if (face_count == 0)
+ if (face_count == 0) {
+ GST_DEBUG_OBJECT (filter, "no face, clearing overlay");
+ g_object_set (filter->svg_overlay, "location", NULL, NULL);
+ GST_OBJECT_LOCK (filter);
+ filter->update_svg = TRUE;
+ GST_OBJECT_UNLOCK (filter);
return;
+ }
/* The last face in the list seems to be the right one, objects mistakenly
* detected as faces for a couple of frames seem to be in the list