examples/seeking/seek.c: Don't consume all CPU in the idle loop.
authorWim Taymans <wim.taymans@gmail.com>
Fri, 9 Jul 2004 14:33:15 +0000 (14:33 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 9 Jul 2004 14:33:15 +0000 (14:33 +0000)
Original commit message from CVS:
* examples/seeking/seek.c: (iterate):
Don't consume all CPU in the idle loop.

ChangeLog
examples/seeking/seek.c

index 5155b78..242642f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-07-09  Wim Taymans  <wim@fluendo.com>
 
+       * examples/seeking/seek.c: (iterate):
+       Don't consume all CPU in the idle loop.
+
+2004-07-09  Wim Taymans  <wim@fluendo.com>
+
        * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_new_output_pad),
        (gst_mpeg_demux_parse_packet), (gst_mpeg_demux_process_private):
        Add pad to element *after* setting the pad functions so that
index fed6b7f..3cd64cd 100644 (file)
@@ -805,6 +805,7 @@ iterate (gpointer data)
   if (!GST_FLAG_IS_SET (GST_OBJECT (data), GST_BIN_SELF_SCHEDULABLE)) {
     res = gst_bin_iterate (GST_BIN (data));
   } else {
+    g_usleep (500);
     res = gst_element_get_state (GST_ELEMENT (data)) == GST_STATE_PLAYING;
   }