[mpp]: wake up the parser thread in the correct place

The src port of the decoder is linked to the hal thread
not the parser thread, I would like only the sink port
of the decoder will driver the parser thread.

Change-Id: I315b41ff1158fa07a9f794c8bb3eefd6ef4fef7c
Signed-off-by: Randy Li <randy.li@rock-chips.com>
This commit is contained in:
Randy Li 2017-09-05 10:17:19 +08:00
parent 28bdc96b2d
commit 01488cf203

View file

@ -286,7 +286,6 @@ MPP_RET Mpp::get_frame(MppFrame *frame)
MppFrame first = NULL;
if (0 == mFrames->list_size()) {
mThreadCodec->signal();
if (mOutputBlock == MPP_POLL_BLOCK) {
if (mOutputBlockTimeout >= 0) {
ret = mFrames->wait(mOutputBlockTimeout);
@ -296,8 +295,9 @@ MPP_RET Mpp::get_frame(MppFrame *frame)
else
return MPP_NOK;
}
} else
} else {
mFrames->wait();
}
} else {
/* NOTE: this sleep is to avoid user's dead loop */
msleep(1);
@ -715,6 +715,7 @@ MPP_RET Mpp::control_dec(MpiCmd cmd, MppParam param)
} break;
case MPP_DEC_SET_INFO_CHANGE_READY: {
ret = mpp_buf_slot_ready(mDec->frame_slots);
mThreadCodec->signal();
} break;
case MPP_DEC_SET_INTERNAL_PTS_ENABLE: {
if (mCoding == MPP_VIDEO_CodingMPEG2 || mCoding == MPP_VIDEO_CodingMPEG4) {