+GST_START_TEST (test_reverse)
+{
+ GstElement *src;
+
+#ifndef TESTFILE
+#error TESTFILE not defined
+#endif
+ src = setup_filesrc ();
+
+ g_object_set (G_OBJECT (src), "location", TESTFILE, NULL);
+ /* we're going to perform the seek in ready */
+ fail_unless (gst_element_set_state (src,
+ GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to ready");
+
+ /* reverse seek from end to start */
+ gst_element_seek (src, -1.0, GST_FORMAT_BYTES, 0, GST_SEEK_TYPE_SET, 100,
+ GST_SEEK_TYPE_SET, -1);
+
+ fail_unless (gst_element_set_state (src,
+ GST_STATE_PAUSED) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to paused");
+
+ /* wait for EOS */
+ wait_eos ();
+
+ fail_unless (gst_element_set_state (src,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+
+ /* cleanup */
+ cleanup_filesrc (src);
+}
+
+GST_END_TEST;
+