summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-07-21 14:51:35 -0700
committerJames Dong <jdong@google.com>2010-07-22 14:51:53 -0700
commit542db5d438988360d491a5add1040a2df9aa90c9 (patch)
tree2780e2456a9b540e245fa3e3c8e62d60c284b8dc /media/libstagefright/codecs
parent348a8eab84f4bba76c04ca83b2f5418467aa1a48 (diff)
downloadframeworks_av-542db5d438988360d491a5add1040a2df9aa90c9.zip
frameworks_av-542db5d438988360d491a5add1040a2df9aa90c9.tar.gz
frameworks_av-542db5d438988360d491a5add1040a2df9aa90c9.tar.bz2
Allows the authoring engine to skip frame.
This is 1st part of the work to allow audio and video resync if we found out that audio and video are out of sync during authoring - also fixed a problem in AACEncoder::read() where the buffer acquired from the buffer group does not release when error out at reading from source. Change-Id: I8a2740097fcfdf85e6178869afeb9f3687a99118
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r--media/libstagefright/codecs/aacenc/AACEncoder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
index e8235c2..052c354 100644
--- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp
+++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
@@ -224,6 +224,7 @@ status_t AACEncoder::read(
if (mInputBuffer == NULL) {
if (mSource->read(&mInputBuffer, options) != OK) {
if (mNumInputSamples == 0) {
+ buffer->release();
return ERROR_END_OF_STREAM;
}
memset(&mInputFrame[mNumInputSamples],