summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_asf.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-19 01:09:39 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-19 01:09:39 +0100
commitfedec814a0af828f9c4e97ed49cdb727e0d64ad0 (patch)
tree6614288d9f0937b640d0efcb757a6ea13bac7a6d /src/demuxers/demux_asf.c
parent5c2f96797e1ad0c9e1e930fd86941fcec27abdc4 (diff)
parent64596f317f7d03ed1f3e747cd2b0664b1d4f6535 (diff)
downloadxine-lib-fedec814a0af828f9c4e97ed49cdb727e0d64ad0.tar.gz
xine-lib-fedec814a0af828f9c4e97ed49cdb727e0d64ad0.tar.bz2
Merge from 1.2 branch.
Diffstat (limited to 'src/demuxers/demux_asf.c')
-rw-r--r--src/demuxers/demux_asf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 889299beb..f5091035b 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.c
@@ -612,14 +612,14 @@ static int demux_asf_send_headers_common (demux_asf_t *this) {
}
static void asf_reorder(demux_asf_t *this, uint8_t *src, int len){
- uint8_t *dst = malloc(len);
+ uint8_t dst[len];
uint8_t *s2 = src;
int i = 0, x, y;
while(len-i >= this->reorder_h * this->reorder_w*this->reorder_b){
for(x = 0; x < this->reorder_w; x++)
for(y = 0; y < this->reorder_h; y++){
- memcpy(dst + i, s2 + (y * this->reorder_w+x) * this->reorder_b,
+ memcpy(&dst[i], s2 + (y * this->reorder_w+x) * this->reorder_b,
this->reorder_b);
i += this->reorder_b;
}
@@ -627,7 +627,6 @@ static void asf_reorder(demux_asf_t *this, uint8_t *src, int len){
}
xine_fast_memcpy(src,dst,i);
- free(dst);
}
/* redefine abs as macro to handle 64-bit diffs.