From 351ba32579feffce78448ab5d5fd0dc5da906017 Mon Sep 17 00:00:00 2001 From: DingWei Date: Thu, 3 Dec 2015 14:26:52 +0000 Subject: [PATCH] remove warning/error in windows vs git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@501 6e48237b-75ef-9749-8fc9-41990f28c85a --- mpp/codec/dec/h264/h264d_parse.c | 2 +- mpp/codec/dec/h265/h265d_parser.c | 7 ++++--- mpp/codec/mpp_dec.cpp | 4 +++- mpp/mpp.cpp | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mpp/codec/dec/h264/h264d_parse.c b/mpp/codec/dec/h264/h264d_parse.c index cbf26456..c96acd78 100644 --- a/mpp/codec/dec/h264/h264d_parse.c +++ b/mpp/codec/dec/h264/h264d_parse.c @@ -830,7 +830,7 @@ MPP_RET parse_prepare_extra_data(H264dInputCtx_t *p_Inp, H264dCurCtx_t *p_Cur) nalu_len = parse_nal_size(p_Inp->nal_size, pdata); VAL_CHECK(ret, (nalu_len > 0)); VAL_CHECK(ret, ((strm_offset + p_Inp->nal_size + nalu_len) <= p_Inp->in_length)); - p_strm->nalu_len = nalu_len; + p_strm->nalu_len = (RK_U32)nalu_len; p_strm->nal_unit_type = NALU_TYPE_SLICE; pdata += p_Inp->nal_size; strm_offset += p_Inp->nal_size; diff --git a/mpp/codec/dec/h265/h265d_parser.c b/mpp/codec/dec/h265/h265d_parser.c index b8db42ce..86c80517 100644 --- a/mpp/codec/dec/h265/h265d_parser.c +++ b/mpp/codec/dec/h265/h265d_parser.c @@ -1967,12 +1967,13 @@ MPP_RET h265d_control(void *ctx, RK_S32 cmd, void *param) } MPP_RET h265d_callback(void *ctx, void *err_info) -{ - - (void) err_info; +{ H265dContext_t *h265dctx = (H265dContext_t *)ctx; HEVCContext *s = (HEVCContext *)h265dctx->priv_data; s->max_ra = INT_MAX; + + (void) err_info; + return MPP_OK; } diff --git a/mpp/codec/mpp_dec.cpp b/mpp/codec/mpp_dec.cpp index 391fe3b1..fd075d92 100644 --- a/mpp/codec/mpp_dec.cpp +++ b/mpp/codec/mpp_dec.cpp @@ -681,6 +681,7 @@ MPP_RET mpp_dec_init(MppDec **dec, MppCodingType coding) MppBufSlots packet_slots = NULL; Parser parser = NULL; MppHal hal = NULL; + HalIOInterruptCB cb = {0}; MppDec *p = mpp_calloc(MppDec, 1); if (NULL == p) { @@ -716,7 +717,8 @@ MPP_RET mpp_dec_init(MppDec **dec, MppCodingType coding) mpp_err_f("could not init parser\n"); break; } - HalIOInterruptCB cb = {.callBack = hal_callback, .opaque = parser}; + cb.callBack = hal_callback; + cb.opaque = parser; // then init hal with task count from parser MppHalCfg hal_cfg = { MPP_CTX_DEC, diff --git a/mpp/mpp.cpp b/mpp/mpp.cpp index 06852994..fe3dfeb0 100644 --- a/mpp/mpp.cpp +++ b/mpp/mpp.cpp @@ -190,7 +190,7 @@ MPP_RET Mpp::get_frame(MppFrame *frame) mThreadCodec->signal(); if (mOutputBlock) mFrames->wait(); - usleep(1000); + msleep(1); } if (mFrames->list_size()) {