mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-12-26 11:17:44 +01:00
fix[kmpp]: Fix channel dup issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com> Change-Id: I20ab644d04156987881ce9c8d384de004b2f4c61
This commit is contained in:
parent
4ed4105a3c
commit
2f2e5f5c3e
1 changed files with 7 additions and 4 deletions
11
mpp/kmpp.c
11
mpp/kmpp.c
|
|
@ -129,6 +129,7 @@ static MPP_RET init(Kmpp *ctx, MppCtxType type, MppCodingType coding)
|
|||
|
||||
hnd = kmpp_obj_get_hnd(ctx->mVencInitKcfg);
|
||||
size = kmpp_obj_get_hnd_size(ctx->mVencInitKcfg);
|
||||
kmpp_obj_get_u32(ctx->mVencInitKcfg, "chan_dup", &ctx->mChanDup);
|
||||
|
||||
ret = mpp_vcodec_ioctl(ctx->mClientFd, VCODEC_CHAN_CREATE, 0, size, hnd);
|
||||
if (ret) {
|
||||
|
|
@ -136,10 +137,12 @@ static MPP_RET init(Kmpp *ctx, MppCtxType type, MppCodingType coding)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = mpp_vcodec_ioctl(ctx->mClientFd, VCODEC_CHAN_START, 0, 0, 0);
|
||||
if (ret) {
|
||||
mpp_err("chan %d VCODEC_CHAN_START failed\n", ctx->mChanId);
|
||||
return ret;
|
||||
if (!ctx->mChanDup) {
|
||||
ret = mpp_vcodec_ioctl(ctx->mClientFd, VCODEC_CHAN_START, 0, 0, 0);
|
||||
if (ret) {
|
||||
mpp_err("chan %d VCODEC_CHAN_START failed\n", ctx->mChanId);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->mPacketGroup == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue