summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18ea709)
raw | patch | inline | side by side (parent: 18ea709)
author | Vincent Stehlé <v-stehle@ti.com> | |
Mon, 4 Jun 2012 08:01:43 +0000 (10:01 +0200) | ||
committer | Rob Clark <rob@ti.com> | |
Sun, 10 Jun 2012 17:49:15 +0000 (12:49 -0500) |
We zero the allocated structures and initialize more fields to their correct
values. This, to avoid complaints from the codec.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
values. This, to avoid complaints from the codec.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
viddec3test.c | patch | blob | history |
diff --git a/viddec3test.c b/viddec3test.c
index 863dc89d7c38a5cb0cf73435dad5805efb49eddb..aa7a9da4249746537763f8b016e0c1bccc755639 100644 (file)
--- a/viddec3test.c
+++ b/viddec3test.c
goto fail;
}
- decoder->inBufs = malloc(sizeof(XDM2_BufDesc));
+ decoder->inBufs = calloc(1, sizeof(XDM2_BufDesc));
decoder->inBufs->numBufs = 1;
decoder->inBufs->descs[0].buf =
(XDAS_Int8 *)omap_bo_handle(decoder->input_bo);
+ decoder->inBufs->descs[0].bufSize.bytes = omap_bo_size(decoder->input_bo);
decoder->inBufs->descs[0].memType = XDM_MEMTYPE_BO;
- decoder->outBufs = malloc(sizeof(XDM2_BufDesc));
+ decoder->outBufs = calloc(1, sizeof(XDM2_BufDesc));
decoder->outBufs->numBufs = 2;
decoder->outBufs->descs[0].memType = XDM_MEMTYPE_BO;
decoder->outBufs->descs[1].memType = XDM_MEMTYPE_BO;
inArgs->inputID = (XDAS_Int32)buf;
outBufs->descs[0].buf = (XDAS_Int8 *)omap_bo_handle(buf->bo[0]);
+ outBufs->descs[0].bufSize.bytes = omap_bo_size(buf->bo[0]);
outBufs->descs[1].buf = (XDAS_Int8 *)omap_bo_handle(buf->bo[1]);
+ outBufs->descs[1].bufSize.bytes = omap_bo_size(buf->bo[1]);
tproc = mark(NULL);
err = VIDDEC3_process(decoder->codec, inBufs, outBufs, inArgs, outArgs);