GstBus *bus;
GError *error = NULL;
+ /* allowing some tolerance permits audiodecoder to come up with
+ * perfect timestamps rather than sticking to upstream ts */
pipe_str = g_strdup_printf ("audiotestsrc num-buffers=100"
- " ! audio/x-raw,rate=44100 ! audioconvert ! vorbisenc ! vorbisdec"
- " ! audio/x-raw-int,rate=44100 ! audioconvert ! vorbisenc "
++ " ! audio/x-raw,rate=44100 ! audioconvert ! vorbisenc "
+ " ! vorbisdec tolerance=10000000 "
" ! identity check-imperfect-timestamp=TRUE ! fakesink");
pipeline = gst_parse_launch (pipe_str, &error);
GST_END_TEST;
-static gboolean
-drop_second_data_buffer (GstPad * droppad, GstBuffer * buffer, gpointer unused)
+static GstProbeReturn
+drop_second_data_buffer (GstPad * droppad, GstProbeType type,
+ GstBuffer * buffer, gpointer unused)
{
- return !(GST_BUFFER_OFFSET (buffer) == 4096);
+ GstProbeReturn res = GST_PROBE_OK;
+
- if (GST_BUFFER_OFFSET (buffer) == 1024)
++ if (GST_BUFFER_OFFSET (buffer) == 4096)
+ res = GST_PROBE_DROP;
+
+ GST_DEBUG ("dropping %d", res);
+
+ return res;
}
GST_START_TEST (test_discontinuity)
GError *error = NULL;
guint drop_id;
+ /* make audioencoder act sufficiently pedantic */
pipe_str = g_strdup_printf ("audiotestsrc samplesperbuffer=1024"
- " ! audio/x-raw,rate=44100" " ! audioconvert ! vorbisenc ! fakesink");
- " ! audio/x-raw-int,rate=44100" " ! audioconvert "
++ " ! audio/x-raw,rate=44100" " ! audioconvert "
+ " ! vorbisenc tolerance=10000000 ! fakesink");
bin = gst_parse_launch (pipe_str, &error);
fail_unless (bin != NULL, "Error parsing pipeline: %s",