summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libmediaplayerservice/StagefrightRecorder.cpp1
-rw-r--r--media/libstagefright/MPEG4Writer.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index de64714..572389f 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -701,6 +701,7 @@ status_t StagefrightRecorder::reset() {
mSampleRate = 8000;
mAudioChannels = 1;
mAudioBitRate = 12200;
+ mInterleaveDurationUs = 0;
mOutputFd = -1;
mFlags = 0;
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index 094059d..e0f8f9e 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -334,8 +334,6 @@ static void StripStartcode(MediaBuffer *buffer) {
}
off_t MPEG4Writer::addLengthPrefixedSample_l(MediaBuffer *buffer) {
- StripStartcode(buffer);
-
off_t old_offset = mOffset;
size_t length = buffer->range_length();
@@ -827,6 +825,8 @@ void MPEG4Writer::Track::threadEntry() {
continue;
}
+ if (is_avc) StripStartcode(buffer);
+
SampleInfo info;
info.size = is_avc
#if USE_NALLEN_FOUR