From 663104b9be90ed303b87c8acddac8421583a9e39 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期三, 16 八月 2017 12:38:59 +0800
Subject: [PATCH] aaaaa
---
RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp b/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp
index ac3c141..099ff6b 100644
--- a/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp
+++ b/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp
@@ -172,8 +172,11 @@
void PL_AndroidMediaCodecDecoder::finit()
{
PL_AMCD_Internal* in = (PL_AMCD_Internal*)internal;
- //todo release codec
- // call AMediaCodec_stop
+
+ AMediaCodec_stop(in->codec);
+ AMediaCodec_delete(in->codec);
+
+ in->reset();
}
bool PL_AndroidMediaCodecDecoder::pay(const PipeMaterial& pm)
@@ -340,7 +343,11 @@
in->lastMbfBuffer.buffSize = in->buffSize;
in->lastMbfBuffer.width = in->config.ak_width;
in->lastMbfBuffer.height = in->config.ak_height;
- microseconds_to_timeval(info.presentationTimeUs, in->lastMbfBuffer.pts);
+
+ if (in->config.ptsUseAbsoluteTime)
+ gettimeofday(&(in->lastMbfBuffer.pts), nullptr);
+ else
+ microseconds_to_timeval(info.presentationTimeUs, in->lastMbfBuffer.pts);
//if (in->lastMbfBuffer.buffSize > 10)
//{
--
Gitblit v1.8.0