[gst-cvs] gst-plugins-good: add debug and an assert

Thomas Vander Stichele thomasvs at kemper.freedesktop.org
Sat Apr 4 06:14:06 PDT 2009


Module: gst-plugins-good
Branch: master
Commit: 5f802dad4eedd54f108aad4eb245467d6ab27024
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=5f802dad4eedd54f108aad4eb245467d6ab27024

Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun Mar 15 21:31:49 2009 +0100

add debug and an assert

---

 tests/check/pipelines/flacdec.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/tests/check/pipelines/flacdec.c b/tests/check/pipelines/flacdec.c
index fb5d503..2f2010f 100644
--- a/tests/check/pipelines/flacdec.c
+++ b/tests/check/pipelines/flacdec.c
@@ -142,16 +142,22 @@ GST_START_TEST (test_decode_seek_partial)
   /* do a partial seek to get the first 1024 samples or 2048 bytes */
   event = gst_event_new_seek (1.0, GST_FORMAT_DEFAULT, GST_SEEK_FLAG_FLUSH,
       GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, 1024);
+  GST_DEBUG ("seeking");
   result = gst_element_send_event (appsink, event);
+  GST_DEBUG ("seeked");
 
   gst_element_set_state (pipeline, GST_STATE_PLAYING);
 
   do {
+    GST_DEBUG ("pulling buffer");
     g_signal_emit_by_name (appsink, "pull-buffer", &buffer);
+    GST_DEBUG ("pulled buffer %x", buffer);
     if (buffer == NULL)
       break;
-    if (firstbyte == 0)
+    if (firstbyte == 0) {
+      fail_unless_equals_int (GST_BUFFER_OFFSET (buffer), 0L);
       firstbyte = GST_BUFFER_DATA (buffer)[0];
+    }
     size += buffer->size;
   }
   while (TRUE);





More information about the Gstreamer-commits mailing list