[vpu_legacy] fixed flush init check issue

[m2vd] add remove rkvb in split frame function

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@956 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenSiyong
2016-06-24 03:34:50 +00:00
parent 8fb04334b4
commit 5896aeda37
2 changed files with 12 additions and 3 deletions

View File

@@ -373,9 +373,18 @@ MPP_RET m2vd_parser_control(void *ctx, RK_S32 cmd_type, void *param)
MPP_RET m2vd_parser_split_frame(RK_U8 *src, RK_U32 src_size, RK_U8 *dst, RK_U32 *dst_size)
{
MPP_RET ret = MPP_OK;
RK_U32 val = 0;
val = *((RK_U32*)src);
memcpy(dst, src, src_size);;
*dst_size = src_size;
#define VPU_BITSTREAM_START_CODE (0x42564b52) /* RKVB, rockchip video bitstream */
if (VPU_BITSTREAM_START_CODE == val) { // if input data is rk format styl skip those 32 byte
memcpy(dst, src + 32, src_size - 32);
*dst_size = src_size - 32;
} else {
memcpy(dst, src, src_size);
*dst_size = src_size;
}
(void)dst;

View File

@@ -110,7 +110,7 @@ RK_S32 VpuApi::flush(VpuCodecContext *ctx)
{
(void)ctx;
mpp_log_f("in\n");
if (mpi && mpi->reset && !init_ok) {
if (mpi && mpi->reset && init_ok) {
mpi->reset(mpp_ctx);
}
mpp_log_f("ok\n");