summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/avc
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-08-12 15:41:11 -0700
committerJames Dong <jdong@google.com>2010-08-12 16:47:17 -0700
commite95d192fae5a80ed821c53bfea214a85ea395e90 (patch)
tree505879e69dbc963cf0382958c44000fce4f3101a /media/libstagefright/codecs/avc
parent5f96138ba65cecf38d0c752d87ad47d931db8775 (diff)
downloadframeworks_base-e95d192fae5a80ed821c53bfea214a85ea395e90.zip
frameworks_base-e95d192fae5a80ed821c53bfea214a85ea395e90.tar.gz
frameworks_base-e95d192fae5a80ed821c53bfea214a85ea395e90.tar.bz2
Mainly fix two mistakes that I made:
1. When the ERROR_END_OF_STREAM is returned from read, the input buffer is not initialized release it would lead to crash 2. The mPrevTimestampUs is not initialized and thus fail in the CHECK(mPrevTimestampUs, timeUs) Change-Id: Id1e51575fb8b3ca48e80547efd3a3a82dfac773b
Diffstat (limited to 'media/libstagefright/codecs/avc')
-rw-r--r--media/libstagefright/codecs/avc/enc/AVCEncoder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
index a99186b..389180c 100644
--- a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
+++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
@@ -98,6 +98,7 @@ AVCEncoder::AVCEncoder(
: mSource(source),
mMeta(meta),
mNumInputFrames(-1),
+ mPrevTimestampUs(-1),
mStarted(false),
mInputBuffer(NULL),
mInputFrameData(NULL),