diff --git a/ChangeLog b/ChangeLog index f228265fbb..79f4c55824 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-22 Tim-Philipp Müller + + * gst-libs/gst/interfaces/xoverlay.c: + Fix prepare-xwindow-id code example in the docs - we need to + ignore all messages that aren't element messages as well. + 2006-01-21 Julien MOUTTE * sys/xvimage/xvimagesink.c: (gst_xvimagesink_buffer_alloc): diff --git a/gst-libs/gst/interfaces/xoverlay.c b/gst-libs/gst/interfaces/xoverlay.c index f31e2ebb05..25119e77bc 100644 --- a/gst-libs/gst/interfaces/xoverlay.c +++ b/gst-libs/gst/interfaces/xoverlay.c @@ -65,12 +65,13 @@ * create_window (GstBus * bus, GstMessage * message, GstPipeline * pipeline) * { * XGCValues values; - * const GstStructure *s; * - * s = gst_message_get_structure (message); - * if (!gst_structure_has_name (s, "prepare-xwindow-id")) { + * // ignore anything but 'prepare-xwindow-id' element messages + * if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT) + * return GST_BUS_PASS; + * + * if (!gst_structure_has_name (message->structure, "prepare-xwindow-id")) * return GST_BUS_PASS; - * } * * win = XCreateSimpleWindow (disp, root, 0, 0, 320, 240, 0, 0, 0); *