mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 01:26:49 +08:00
[mpp]: Fix compiling error on Linux
Issue: https://github.com/rockchip-linux/mpp/issues/48 Change-Id: I08bc75a4cab23d4b96c6bac3b671e50edbff55fb Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -162,7 +162,7 @@ MPP_RET dummy_dec_prepare(void *dec, MppPacket pkt, HalDecTask *task)
|
||||
data = mpp_packet_get_data(pkt);
|
||||
length = mpp_packet_get_length(pkt);
|
||||
if (length > p->stream_size) {
|
||||
mpp_realloc(p->stream, RK_U8, length);
|
||||
p->stream = mpp_realloc(p->stream, RK_U8, length);
|
||||
mpp_packet_set_data(p->task_pkt, p->stream);
|
||||
p->stream_size = length;
|
||||
}
|
||||
|
@@ -109,8 +109,7 @@ static RK_S32 mpp_device_get_client_type(MppDevCtx ctx, MppCtxType type, MppCodi
|
||||
RK_S32 client_type = -1;
|
||||
MppDevCtxImpl *p;
|
||||
|
||||
if (NULL == ctx ||
|
||||
(type >= MPP_CTX_BUTT || type < 0) ||
|
||||
if (NULL == ctx || type >= MPP_CTX_BUTT ||
|
||||
(coding >= MPP_VIDEO_CodingMax || coding <= MPP_VIDEO_CodingUnused)) {
|
||||
mpp_err_f("found NULL input ctx %p coding %d type %d\n", ctx, coding, type);
|
||||
return MPP_ERR_NULL_PTR;
|
||||
|
@@ -17,6 +17,8 @@
|
||||
|
||||
#define MODULE_TAG "mpp_impl"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "mpp_mem.h"
|
||||
#include "mpp_env.h"
|
||||
#include "mpp_common.h"
|
||||
|
@@ -78,7 +78,7 @@ MppTimer mpp_timer_get(const char *name)
|
||||
MppTimerImpl *impl = mpp_calloc(MppTimerImpl, 1);
|
||||
if (impl) {
|
||||
impl->check = module_name;
|
||||
snprintf(impl->name, sizeof(impl->name), name);
|
||||
snprintf(impl->name, sizeof(impl->name), name, NULL);
|
||||
} else
|
||||
mpp_err_f("malloc failed\n");
|
||||
|
||||
|
Reference in New Issue
Block a user