diff --git a/codec/hdi_service/codec_proxy/codec_proxy.c b/codec/hdi_service/codec_proxy/codec_proxy.c index 41974863d69aba22ffb3c477fcf538214bf0470c..9a0174eca91415fdb706fbf92109e2dc0c1c1ce1 100644 --- a/codec/hdi_service/codec_proxy/codec_proxy.c +++ b/codec/hdi_service/codec_proxy/codec_proxy.c @@ -216,12 +216,14 @@ static int32_t CodecProxyCreate(struct ICodec *self, const char* name, CODEC_HAN } int32_t ret = CodecProxyCall(self, CMD_CODEC_CREATE, data, reply); if (ret != HDF_SUCCESS) { - HDF_LOGE("%{public}s: call failed! error code is %{public}d", __func__, ret); + HDF_LOGE("%{public}s: call create failed! error code is %{public}d", __func__, ret); CodecProxySBufRecycle(data, reply); return ret; } if (!HdfSbufReadUint64(reply, (uint64_t *)handle)) { - ret = HDF_ERR_INVALID_PARAM; + HDF_LOGE("%{public}s: read handle failed!", __func__); + CodecProxySBufRecycle(data, reply); + return HDF_ERR_INVALID_PARAM; } CodecProxySBufRecycle(data, reply); return ret; @@ -257,12 +259,14 @@ static int32_t CodecCreateByType(struct ICodec *self, CodecType type, AvCodecMim } ret = CodecProxyCall(self, CMD_CODEC_CREATE_BY_TYPE, data, reply); if (ret != HDF_SUCCESS) { - HDF_LOGE("%{public}s: call failed! error code is %{public}d", __func__, ret); + HDF_LOGE("%{public}s: call CreateByType failed! error code is %{public}d", __func__, ret); CodecProxySBufRecycle(data, reply); return ret; } if (!HdfSbufReadUint64(reply, (uint64_t *)handle)) { - ret = HDF_ERR_INVALID_PARAM; + HDF_LOGE("%{public}s: failed to read handle!", __func__); + CodecProxySBufRecycle(data, reply); + return HDF_ERR_INVALID_PARAM; } CodecProxySBufRecycle(data, reply); return ret; @@ -676,7 +680,7 @@ static int32_t CodecProxyDequeueInputParseReply(struct HdfSBuf *reply, int32_t * return HDF_SUCCESS; } -int32_t CodecProxyDequeueInput(struct ICodec *self, CODEC_HANDLETYPE handle, +static int32_t CodecProxyDequeueInput(struct ICodec *self, CODEC_HANDLETYPE handle, uint32_t timeoutMs, int32_t *acquireFd, CodecBuffer *inputData) { struct HdfSBuf *data = NULL; diff --git a/codec/hdi_service/codec_service_stub/codec_stub.c b/codec/hdi_service/codec_service_stub/codec_stub.c index 16ab4f272a35f000ee00d3e6aaf6497cc8f28466..3293f4c8a375eb51395351cc92fb9916acc5ed35 100644 --- a/codec/hdi_service/codec_service_stub/codec_stub.c +++ b/codec/hdi_service/codec_service_stub/codec_stub.c @@ -138,6 +138,7 @@ static int32_t SerCodecCreate(struct HdfDeviceIoClient *client, struct HdfSBuf * static int32_t SerCodecCreateByType(struct HdfDeviceIoClient *client, struct HdfSBuf *data, struct HdfSBuf *reply) { + (void)client; int32_t errNum; CodecType type; AvCodecMime mime; @@ -381,6 +382,8 @@ static int32_t SerCodecStop(struct HdfDeviceIoClient *client, struct HdfSBuf *da static int32_t SerCodecReset(struct HdfDeviceIoClient *client, struct HdfSBuf *data, struct HdfSBuf *reply) { + (void)client; + (void)reply; uint64_t handle = 0; if (!HdfSbufReadUint64(data, &handle)) { HDF_LOGE("%{public}s: read handle data failed!", __func__); @@ -667,7 +670,7 @@ static int32_t HandleRequestCmdExt(struct HdfDeviceIoClient *client, int cmdId, } } -int32_t HandleRequestCmd(struct HdfDeviceIoClient *client, int cmdId, +static int32_t HandleRequestCmd(struct HdfDeviceIoClient *client, int cmdId, struct HdfSBuf *data, struct HdfSBuf *reply) { switch (cmdId) {