Index: gst/videorate/gstvideorate.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/videorate/gstvideorate.c,v
retrieving revision 1.37
diff -u -r1.37 gstvideorate.c
--- gst/videorate/gstvideorate.c	6 Apr 2006 11:40:45 -0000	1.37
+++ gst/videorate/gstvideorate.c	19 Apr 2006 11:55:02 -0000
@@ -549,6 +549,17 @@
 
     videorate->in++;
 
+    /* drop new buffer if it's before previous one */
+    if (intime < prevtime) {
+      GST_DEBUG_OBJECT (videorate,
+			"The new buffer ("GST_TIME_FORMAT") is before the previous buffer ("
+			GST_TIME_FORMAT"). Dropping new buffer.",
+			GST_TIME_ARGS (intime),
+			GST_TIME_ARGS (prevtime));
+      gst_buffer_unref (buffer);
+      goto done;
+    }
+
     /* got 2 buffers, see which one is the best */
     do {
       diff1 = prevtime - videorate->next_ts;
