From 94e704acde59df60bd42f6f90b94d462d1bfa37c Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期日, 23 七月 2017 12:09:41 +0800
Subject: [PATCH] 

---
 RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp b/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp
index ac3c141..768f904 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)

--
Gitblit v1.8.0