[mpp_pacet]: rename mpp_packet_copy to mpp_packet_copy_init

[mpp_dec]: put_packet will transfer pointer rather than implement

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@306 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-09-24 23:48:31 +00:00
parent 5c602b7193
commit 7a5a04ccd1
4 changed files with 11 additions and 8 deletions

View File

@@ -56,7 +56,7 @@ Mpp::Mpp(MppCtxType type, MppCodingType coding)
{
switch (mType) {
case MPP_CTX_DEC : {
mPackets = new mpp_list((node_destructor)NULL);
mPackets = new mpp_list((node_destructor)mpp_packet_deinit);
mFrames = new mpp_list((node_destructor)mpp_frame_deinit);
mTasks = new mpp_list((node_destructor)NULL);
@@ -156,7 +156,9 @@ MPP_RET Mpp::put_packet(MppPacket packet)
{
Mutex::Autolock autoLock(mPackets->mutex());
if (mPackets->list_size() < 4) {
mPackets->add_at_tail(packet, sizeof(MppPacketImpl));
MppPacket pkt;
mpp_packet_copy_init(&pkt, packet);
mPackets->add_at_tail(&pkt, sizeof(pkt));
mPacketPutCount++;
mThreadCodec->signal();
return MPP_OK;