diff options
author | Wonsik Kim <wonsik@google.com> | 2018-09-18 15:20:14 -0700 |
---|---|---|
committer | Wonsik Kim <wonsik@google.com> | 2018-09-18 16:48:24 -0700 |
commit | 2c36526ad07b536d85867903c2b827d7581af9e9 (patch) | |
tree | 0ee4a0bfe91df1c5b9bfa80cd5cf5ea7180fe3dc | |
parent | b49dc95baee6ed4be00eae9aba6b1cf7a688f5f3 (diff) | |
download | av-2c36526ad07b536d85867903c2b827d7581af9e9.tar.gz |
vorbisdec: fix flush
Bug: 113983576
Test: CTS @Small tests
Change-Id: I35193bf1ffacbe6b7a4f9b2ad0ab6bb9eaf3cb82
-rw-r--r-- | media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp index 8912f8ae93..d534f64d1d 100644 --- a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp +++ b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp @@ -548,11 +548,21 @@ void SoftVorbis::onPortFlushCompleted(OMX_U32 portIndex) { // Make sure that the next buffer output does not still // depend on fragments from the last one decoded. + mInputBufferCount = 0; mNumFramesOutput = 0; + if (mState != NULL) { + vorbis_dsp_clear(mState); + delete mState; + mState = NULL; + } + if (mVi != NULL) { + vorbis_info_clear(mVi); + delete mVi; + mVi = NULL; + } mSawInputEos = false; mSignalledOutputEos = false; mNumFramesLeftOnPage = -1; - vorbis_dsp_restart(mState); } } |