From 53b0a2b1f9cb6b99b3f0d1a639921d1b24bc30b7 Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Tue, 4 Jun 2013 18:43:08 -0700 Subject: Reset PV decoder on SoftMPEG4 decoder reset Otherwise, state may be undefined for subsequent frames. Change-Id: Icdc0126247e1422eba21f2008a04cf7867d93f5d Signed-off-by: Lajos Molnar Bug: 9284771 (cherry picked from commit 0f15875b8e80fb49a3b18d88964b063326f307b9) --- media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'media/libstagefright/codecs') diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index 3c15adc..875674b 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -574,6 +574,11 @@ void SoftMPEG4::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) { void SoftMPEG4::onReset() { mSignalledError = false; mOutputPortSettingsChange = NONE; + mFramesConfigured = false; + if (mInitialized) { + PVCleanUpVideoDecoder(mHandle); + mInitialized = false; + } } void SoftMPEG4::updatePortDefinitions() { -- cgit v1.1