summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Chaofan <chaofan.huang@nxp.com>2018-11-29 19:31:18 +0800
committerHuang Chaofan <chaofan.huang@nxp.com>2018-12-04 10:46:10 +0800
commit66620c3d281c5a5b27cbb7a51276d2f94f619f1c (patch)
tree585b9b0d26dfbb86ec6b01d87103411475e42484
parent5061a195c6683332bb1594616a6a52f5eafa9358 (diff)
MLK-20494: Adjust update stream function for the format that need addrel_imx_4.14.78_1.0.0_ga
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.c6
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);