mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 17:46:50 +08:00
[vpu_api_legacy]: fix empty buffer on info change frame
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@411 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -139,21 +139,23 @@ RK_S32 VpuApi:: decode_getoutframe(DecoderOut_t *aDecOut)
|
|||||||
vframe->ShowTime.TimeHigh = (RK_U32)(pts >> 32);
|
vframe->ShowTime.TimeHigh = (RK_U32)(pts >> 32);
|
||||||
vframe->ShowTime.TimeLow = (RK_U32)pts;
|
vframe->ShowTime.TimeLow = (RK_U32)pts;
|
||||||
buf = mpp_frame_get_buffer(mframe);
|
buf = mpp_frame_get_buffer(mframe);
|
||||||
ptr = mpp_buffer_get_ptr(buf);
|
if (buf) {
|
||||||
fd = mpp_buffer_get_fd(buf);
|
ptr = mpp_buffer_get_ptr(buf);
|
||||||
vframe->FrameBusAddr[0] = fd;
|
fd = mpp_buffer_get_fd(buf);
|
||||||
vframe->FrameBusAddr[1] = fd;
|
vframe->FrameBusAddr[0] = fd;
|
||||||
vframe->vpumem.vir_addr = (RK_U32*)ptr;
|
vframe->FrameBusAddr[1] = fd;
|
||||||
frame_count++;
|
vframe->vpumem.vir_addr = (RK_U32*)ptr;
|
||||||
|
frame_count++;
|
||||||
#ifdef DUMP_YUV
|
#ifdef DUMP_YUV
|
||||||
if (frame_count > 350) {
|
if (frame_count > 350) {
|
||||||
fwrite(ptr, 1, vframe->FrameWidth * vframe->FrameHeight * 3 / 2, fp);
|
fwrite(ptr, 1, vframe->FrameWidth * vframe->FrameHeight * 3 / 2, fp);
|
||||||
fflush(fp);
|
fflush(fp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
vframe->vpumem.phy_addr = fd;
|
vframe->vpumem.phy_addr = fd;
|
||||||
vframe->vpumem.size = vframe->FrameWidth * vframe->FrameHeight * 3 / 2;
|
vframe->vpumem.size = vframe->FrameWidth * vframe->FrameHeight * 3 / 2;
|
||||||
vframe->vpumem.offset = (RK_U32*)buf;
|
vframe->vpumem.offset = (RK_U32*)buf;
|
||||||
|
}
|
||||||
if (mpp_frame_get_eos(mframe)) {
|
if (mpp_frame_get_eos(mframe)) {
|
||||||
aDecOut->nFlags = VPU_API_EOS_STREAM_REACHED;
|
aDecOut->nFlags = VPU_API_EOS_STREAM_REACHED;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user