summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-08-10 19:54:57 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-08-10 19:54:57 +0100
commit08a918ec5fccd1ef122847bd4376fbb61797a367 (patch)
tree1c1b8625d4b99b9d3064d14ff411697fe3a23035 /tests
parented69b2896f3fe86162cc90fd4f8d7d3ebb63fefc (diff)
downloadgstreamer-plugins-bad-08a918ec5fccd1ef122847bd4376fbb61797a367.tar.gz
tests: mpeg2enc: fix 'Got data flow before stream-start event' failure
Diffstat (limited to 'tests')
-rw-r--r--tests/check/elements/mpeg2enc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/check/elements/mpeg2enc.c b/tests/check/elements/mpeg2enc.c
index 82967795a..24c7ab14d 100644
--- a/tests/check/elements/mpeg2enc.c
+++ b/tests/check/elements/mpeg2enc.c
@@ -127,13 +127,15 @@ GST_START_TEST (test_video_pad)
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
+ caps = gst_caps_from_string (VIDEO_CAPS_STRING);
+ gst_check_setup_events_with_stream_id (mysrcpad, mpeg2enc, caps,
+ GST_FORMAT_TIME, "/test/mpeg2enc");
+ gst_caps_unref (caps);
+
/* corresponds to I420 buffer for the size mentioned in the caps */
inbuffer = gst_buffer_new_and_alloc (384 * 288 * 3 / 2);
/* makes valgrind's memcheck happier */
gst_buffer_memset (inbuffer, 0, 0, -1);
- caps = gst_caps_from_string (VIDEO_CAPS_STRING);
- gst_pad_set_caps (mysrcpad, caps);
- gst_caps_unref (caps);
GST_BUFFER_TIMESTAMP (inbuffer) = 0;
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);