From: Wim Taymans Date: Fri, 2 Mar 2012 12:02:37 +0000 (+0100) Subject: tests: improve metadata test X-Git-Tag: RELEASE-0.11.3~82 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68a6f2faaf08c1c11cb12d2277c40644c0a184db;p=platform%2Fupstream%2Fgstreamer.git tests: improve metadata test --- diff --git a/tests/check/gst/gstmeta.c b/tests/check/gst/gstmeta.c index b3ea3d7..2840196 100644 --- a/tests/check/gst/gstmeta.c +++ b/tests/check/gst/gstmeta.c @@ -96,18 +96,22 @@ test_transform_func (GstBuffer * transbuf, GstMeta * meta, GstMetaTransformCopy *copy_data = data; test = GST_META_TEST_ADD (transbuf); + if (copy_data->offset == 0) { /* same offset, copy timestamps */ test->pts = tmeta->pts; test->dts = tmeta->dts; - if (copy_data->size == gst_buffer_get_size (buffer)) { + if (!copy_data->region) { + fail_unless (gst_buffer_get_size (buffer) == copy_data->size); /* same size, copy duration */ test->duration = tmeta->duration; } else { + fail_unless (gst_buffer_get_size (buffer) > copy_data->size); /* else clear */ test->duration = GST_CLOCK_TIME_NONE; } } else { + fail_unless (copy_data->region == TRUE); test->pts = -1; test->dts = -1; test->duration = -1;