gst-libs/gst/interfaces/xoverlay.c: Fix prepare-xwindow-id code example in the docs - we need to ignore all messages ...

Original commit message from CVS:
* 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.
This commit is contained in:
Tim-Philipp Müller 2006-01-22 14:50:53 +00:00
parent db4de40ebf
commit 4757506720
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2006-01-22 Tim-Philipp Müller <tim at centricular dot net>
* 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 <julien@moutte.net>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_buffer_alloc):

View file

@ -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-&gt;structure, "prepare-xwindow-id"))
* return GST_BUS_PASS;
* }
*
* win = XCreateSimpleWindow (disp, root, 0, 0, 320, 240, 0, 0, 0);
*