From bd00b345a449b9a198e8aec3ae312933430e0ec3 Mon Sep 17 00:00:00 2001 From: ChenHengming Date: Wed, 28 Oct 2015 21:55:35 +0000 Subject: [PATCH] [mpp_dec]: fix stall on internal buffer mode git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@433 6e48237b-75ef-9749-8fc9-41990f28c85a --- mpp/codec/mpp_buf_slot.cpp | 5 +++++ mpp/codec/mpp_dec.cpp | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mpp/codec/mpp_buf_slot.cpp b/mpp/codec/mpp_buf_slot.cpp index 14052912..5715cf34 100644 --- a/mpp/codec/mpp_buf_slot.cpp +++ b/mpp/codec/mpp_buf_slot.cpp @@ -773,9 +773,14 @@ MPP_RET mpp_buf_slot_set_prop(MppBufSlots slots, RK_S32 index, SlotPropType type */ generate_info_set(impl, frame); if (mpp_frame_info_cmp(impl->info, impl->info_set)) { + MppFrameImpl *old = (MppFrameImpl *)impl->info; // info change found here impl->info_changed = 1; mpp_log("info change found\n"); + mpp_log("old width %4d height %4d stride hor %4d ver %4d\n", + old->width, old->height, old->hor_stride, old->ver_stride); + mpp_log("new width %4d height %4d stride hor %4d ver %4d\n", + dst->width, dst->height, dst->hor_stride, dst->ver_stride); } } break; case SLOT_BUFFER: { diff --git a/mpp/codec/mpp_dec.cpp b/mpp/codec/mpp_dec.cpp index 169e2fb1..6aa61973 100644 --- a/mpp/codec/mpp_dec.cpp +++ b/mpp/codec/mpp_dec.cpp @@ -182,10 +182,12 @@ void *mpp_dec_parser_thread(void *data) parser->wait(); parser->unlock(); - wait.dec_pic_buf = (mpp_buffer_group_unused(mpp->mFrameGroup) < 1); + if (mpp->mFrameGroup) { + wait.dec_pic_buf = (mpp_buffer_group_unused(mpp->mFrameGroup) < 1); + if (wait.dec_pic_buf) + continue; + } - if(wait.dec_pic_buf) - continue; /* * 1. get task handle from hal for parsing one frame */