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-05-01 17:43:31 +0100 |
commit | 7c3ed7b4250bf09c3249b9017b847382ad1f64c4 (patch) | |
tree | 5d2ef160936578383161de55e34cec13821fddb0 | |
parent | 20edc82aba65f5e35f90217b29fba975e96815e4 (diff) |
MLK-20494: Adjust update stream function for the format that need add
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); |