summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2012-03-15 22:49:51 +0100
committerStefan Sauer <ensonic@users.sf.net>2012-03-15 22:49:51 +0100
commita31a698943b2402da2e23886b46e61f9d143ce4e (patch)
treeaa23d3dcec3b46f5183555d000785fbf8928ce27
parent3d7c8aad7024014fd9e48f5c52d42bcc5564c2d6 (diff)
downloadgstreamer-plugins-bad-a31a698943b2402da2e23886b46e61f9d143ce4e.tar.gz
faceoverlay: don't access message fields directly
-rw-r--r--gst/faceoverlay/gstfaceoverlay.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gst/faceoverlay/gstfaceoverlay.c b/gst/faceoverlay/gstfaceoverlay.c
index 67bd96ee4..7d87fc726 100644
--- a/gst/faceoverlay/gstfaceoverlay.c
+++ b/gst/faceoverlay/gstfaceoverlay.c
@@ -191,7 +191,7 @@ gst_face_overlay_change_state (GstElement * element, GstStateChange transition)
}
static void
-gst_face_overlay_handle_faces (GstFaceOverlay * filter, GstStructure * s)
+gst_face_overlay_handle_faces (GstFaceOverlay * filter, const GstStructure * s)
{
guint x, y, width, height;
int delta_x, delta_y, svg_x, svg_y, svg_width, svg_height;
@@ -268,9 +268,12 @@ gst_face_overlay_handle_faces (GstFaceOverlay * filter, GstStructure * s)
static void
gst_face_overlay_message_handler (GstBin * bin, GstMessage * message)
{
- if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT &&
- gst_structure_has_name (message->structure, "facedetect")) {
- gst_face_overlay_handle_faces (GST_FACEOVERLAY (bin), message->structure);
+ if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT) {
+ const GstStructure *s = gst_message_get_structure (message);
+
+ if (gst_structure_has_name (s, "facedetect")) {
+ gst_face_overlay_handle_faces (GST_FACEOVERLAY (bin), s);
+ }
}
GST_BIN_CLASS (parent_class)->handle_message (bin, message);