summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2011-03-24 11:49:46 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2011-03-28 20:08:46 +0200
commit6f2af5aa87961a53387e99f89f417657bb9d6e6e (patch)
treebaf1b5b63b90b1b383b19b825f4e4e364981ba4a /tests
parent38ffe3074501da833e2b4fe374a0def2758fba23 (diff)
memory: more fixes
Automatically make the memory of a buffer writable when the buffer is writable and the memory is asked to mapped WRITE. Add docs
Diffstat (limited to 'tests')
-rw-r--r--tests/check/libs/adapter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/check/libs/adapter.c b/tests/check/libs/adapter.c
index f8310e33c..df1bc1cb6 100644
--- a/tests/check/libs/adapter.c
+++ b/tests/check/libs/adapter.c
@@ -280,16 +280,16 @@ create_and_fill_adapter (void)
for (i = 0; i < 10000; i += 4) {
GstBuffer *buf;
- guint8 *data;
+ guint8 *data, *ptr;
buf = gst_buffer_new_and_alloc (sizeof (guint32) * 4);
fail_unless (buf != NULL);
- data = gst_buffer_map (buf, NULL, NULL, GST_MAP_WRITE);
+ ptr = data = gst_buffer_map (buf, NULL, NULL, GST_MAP_WRITE);
for (j = 0; j < 4; j++) {
- GST_WRITE_UINT32_LE (data, i + j);
- data += sizeof (guint32);
+ GST_WRITE_UINT32_LE (ptr, i + j);
+ ptr += sizeof (guint32);
}
gst_buffer_unmap (buf, data, sizeof (guint32) * 4);