Merge "Added support for 3GPP meta data atoms"
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 7eeb4f8..2c84605 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -557,7 +557,9 @@
// must be called with mLock held
status_t AudioTrack::setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCount)
{
- if (mSharedBuffer == 0 || mIsTimed) {
+ // SoundPool streaming implementation uses AudioTrack EVENT_MORE_DATA callback mode,
+ // and relies on being able to loop the data provided by the most recent callback.
+ if (/*mSharedBuffer == 0 ||*/ mIsTimed) {
return INVALID_OPERATION;
}
diff --git a/media/libstagefright/rtsp/AAVCAssembler.cpp b/media/libstagefright/rtsp/AAVCAssembler.cpp
index 7ea132e..a6825eb 100644
--- a/media/libstagefright/rtsp/AAVCAssembler.cpp
+++ b/media/libstagefright/rtsp/AAVCAssembler.cpp
@@ -106,6 +106,13 @@
++mNextExpectedSeqNo;
return success ? OK : MALFORMED_PACKET;
+ } else if (nalType == 0) {
+ ALOGV("Ignoring undefined nal type.");
+
+ queue->erase(queue->begin());
+ ++mNextExpectedSeqNo;
+
+ return OK;
} else {
ALOGV("Ignoring unsupported buffer (nalType=%d)", nalType);
diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp
index 3068541..8b209c4 100644
--- a/media/libstagefright/rtsp/ARTSPConnection.cpp
+++ b/media/libstagefright/rtsp/ARTSPConnection.cpp
@@ -565,6 +565,9 @@
if (sawCR && c == '\n') {
line->erase(line->size() - 1, 1);
return true;
+ } else if (c == '\n') {
+ // some reponse line ended with '\n', instead of '\r\n'.
+ return true;
}
line->append(&c, 1);
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 97f66f4..0b88c0e 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -4327,9 +4327,9 @@
void AudioFlinger::RecordThread::readInputParameters()
{
- delete mRsmpInBuffer;
+ delete[] mRsmpInBuffer;
// mRsmpInBuffer is always assigned a new[] below
- delete mRsmpOutBuffer;
+ delete[] mRsmpOutBuffer;
mRsmpOutBuffer = NULL;
delete mResampler;
mResampler = NULL;