diff options
author | Huang Chaofan <chaofan.huang@nxp.com> | 2018-11-29 19:31:18 +0800 |
---|---|---|
committer | Bryan O'Donoghue <bryan.odonoghue@linaro.org> | 2019-01-25 16:14:22 +0000 |
commit | e6812a58834118c9c6abedbd0f31859c7483c289 (patch) | |
tree | 551a42eb1a2cc44ee173ced674868a8b2ebd0fed | |
parent | 017d196f1223df6a416ce948125b5a7e7822deb8 (diff) |
MLK-20494: Adjust update stream function for the format that need addmbl_v4.14.95+imx8mm-1
start code
Adjust update stream function for the format that need add start code
Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit 3b29245bc201f1090e46c70ca60e61093e27675e)
-rw-r--r-- | drivers/mxc/vpu-decoder-b0/vpu_b0.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mxc/vpu-decoder-b0/vpu_b0.c b/drivers/mxc/vpu-decoder-b0/vpu_b0.c index ec10bdce0d8e..bb11695a8eda 100644 --- a/drivers/mxc/vpu-decoder-b0/vpu_b0.c +++ b/drivers/mxc/vpu-decoder-b0/vpu_b0.c @@ -1549,7 +1549,7 @@ static int update_stream_addr(struct vpu_ctx *ctx, void *input_buffer, uint32_t uint32_t index = ctx->str_index; pSTREAM_BUFFER_DESCRIPTOR_TYPE pStrBufDesc; struct queue_data *q_data = &ctx->q_data[V4L2_SRC]; - u_int8 payload_header[256]; + u_int8 payload_header[256] = {0}; uint32_t nfreespace = 0; uint32_t wptr; uint32_t rptr; @@ -1632,6 +1632,9 @@ static int update_stream_addr(struct vpu_ctx *ctx, void *input_buffer, uint32_t wptr = start + buffer_size - (end-wptr); } } else { + memcpy(wptr_virt, payload_header, length); + wptr += length; + wptr_virt += length; memcpy(wptr_virt, input_buffer, buffer_size); wptr += buffer_size; } @@ -3084,6 +3087,7 @@ err_firmware_load: atomic64_sub(sizeof(MediaIPFW_Video_SeqInfo), &ctx->statistic.total_alloc_size); release_queue_data(ctx); err_alloc_seq: + remove_instance_file(ctx); kfifo_free(&ctx->msg_fifo); err_alloc_fifo: destroy_workqueue(ctx->instance_wq); |