summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-01-10 12:37:41 +0000
committerPierre Ossman <ossman@cendio.se>2006-01-10 12:37:41 +0000
commitd429222476ce224a86428f8d0527e61a672edf2b (patch)
treeceb00cc9e6148940be954b6f2f52ad84deb70249
parent11c6cac3241bf7bc647f3e8b7da751e0c88982ea (diff)
Accidental use of a swapped int.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@441 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--polyp/tagstruct.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/polyp/tagstruct.c b/polyp/tagstruct.c
index 1e44f8ef..1ff09cd1 100644
--- a/polyp/tagstruct.c
+++ b/polyp/tagstruct.c
@@ -149,14 +149,15 @@ void pa_tagstruct_put_sample_spec(struct pa_tagstruct *t, const struct pa_sample
}
void pa_tagstruct_put_arbitrary(struct pa_tagstruct *t, const void *p, size_t length) {
+ uint32_t tmp;
assert(t && p);
extend(t, 5+length);
t->data[t->length] = TAG_ARBITRARY;
+ tmp = htonl(length);
+ memcpy(t->data+t->length+1, &tmp, 4);
if (length)
memcpy(t->data+t->length+5, p, length);
- length = htonl(length);
- memcpy(t->data+t->length+1, &length, 4);
t->length += 5+length;
}