Loading media/extractors/midi/MidiExtractor.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -247,8 +247,9 @@ MediaBufferBase* MidiEngine::readBuffer() { EAS_I32 numRendered; EAS_RESULT result = EAS_Render(mEasData, p, mEasConfig->mixBufferSize, &numRendered); if (result != EAS_SUCCESS) { ALOGE("EAS_Render returned %ld", result); break; ALOGE("EAS_Render() returned %ld, numBytesOutput = %d", result, numBytesOutput); buffer->release(); return NULL; // Stop processing to prevent infinite loops. } p += numRendered * mEasConfig->numChannels; numBytesOutput += numRendered * mEasConfig->numChannels * sizeof(EAS_PCM); Loading media/libmedia/include/media/MediaProfiles.h +1 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ public: * successful only when validation is successful. */ static constexpr char const * const xmlFiles[] = { "odm/etc/media_profiles_V1_0.xml", "vendor/etc/media_profiles_V1_0.xml", "system/etc/media_profiles.xml" }; Loading media/libstagefright/FrameDecoder.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -301,10 +301,13 @@ status_t FrameDecoder::extractInternal() { err = mSource->read(&mediaBuffer, &mReadOptions); mReadOptions.clearSeekTo(); if (err != OK) { ALOGW("Input Error or EOS"); mHaveMoreInputs = false; if (!mFirstSample && err == ERROR_END_OF_STREAM) { (void)mDecoder->queueInputBuffer( index, 0, 0, 0, MediaCodec::BUFFER_FLAG_EOS); err = OK; } else { ALOGW("Input Error: err=%d", err); } break; } Loading media/libstagefright/MediaCodec.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -860,7 +860,15 @@ static CodecBase *CreateCCodec() { } //static sp<CodecBase> MediaCodec::GetCodecBase(const AString &name) { sp<CodecBase> MediaCodec::GetCodecBase(const AString &name, const char *owner) { if (owner) { if (strncmp(owner, "default", 8) == 0) { return new ACodec; } else if (strncmp(owner, "codec2", 7) == 0) { return CreateCCodec(); } } if (name.startsWithIgnoreCase("c2.")) { return CreateCCodec(); } else if (name.startsWithIgnoreCase("omx.")) { Loading @@ -884,11 +892,6 @@ status_t MediaCodec::init(const AString &name) { // we need to invest in an extra looper to free the main event // queue. mCodec = GetCodecBase(name); if (mCodec == NULL) { return NAME_NOT_FOUND; } mCodecInfo.clear(); bool secureCodec = false; Loading Loading @@ -922,6 +925,11 @@ status_t MediaCodec::init(const AString &name) { return NAME_NOT_FOUND; } mCodec = GetCodecBase(name, mCodecInfo->getOwnerName()); if (mCodec == NULL) { return NAME_NOT_FOUND; } if (mIsVideo) { // video codec needs dedicated looper if (mCodecLooper == NULL) { Loading Loading
media/extractors/midi/MidiExtractor.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -247,8 +247,9 @@ MediaBufferBase* MidiEngine::readBuffer() { EAS_I32 numRendered; EAS_RESULT result = EAS_Render(mEasData, p, mEasConfig->mixBufferSize, &numRendered); if (result != EAS_SUCCESS) { ALOGE("EAS_Render returned %ld", result); break; ALOGE("EAS_Render() returned %ld, numBytesOutput = %d", result, numBytesOutput); buffer->release(); return NULL; // Stop processing to prevent infinite loops. } p += numRendered * mEasConfig->numChannels; numBytesOutput += numRendered * mEasConfig->numChannels * sizeof(EAS_PCM); Loading
media/libmedia/include/media/MediaProfiles.h +1 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ public: * successful only when validation is successful. */ static constexpr char const * const xmlFiles[] = { "odm/etc/media_profiles_V1_0.xml", "vendor/etc/media_profiles_V1_0.xml", "system/etc/media_profiles.xml" }; Loading
media/libstagefright/FrameDecoder.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -301,10 +301,13 @@ status_t FrameDecoder::extractInternal() { err = mSource->read(&mediaBuffer, &mReadOptions); mReadOptions.clearSeekTo(); if (err != OK) { ALOGW("Input Error or EOS"); mHaveMoreInputs = false; if (!mFirstSample && err == ERROR_END_OF_STREAM) { (void)mDecoder->queueInputBuffer( index, 0, 0, 0, MediaCodec::BUFFER_FLAG_EOS); err = OK; } else { ALOGW("Input Error: err=%d", err); } break; } Loading
media/libstagefright/MediaCodec.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -860,7 +860,15 @@ static CodecBase *CreateCCodec() { } //static sp<CodecBase> MediaCodec::GetCodecBase(const AString &name) { sp<CodecBase> MediaCodec::GetCodecBase(const AString &name, const char *owner) { if (owner) { if (strncmp(owner, "default", 8) == 0) { return new ACodec; } else if (strncmp(owner, "codec2", 7) == 0) { return CreateCCodec(); } } if (name.startsWithIgnoreCase("c2.")) { return CreateCCodec(); } else if (name.startsWithIgnoreCase("omx.")) { Loading @@ -884,11 +892,6 @@ status_t MediaCodec::init(const AString &name) { // we need to invest in an extra looper to free the main event // queue. mCodec = GetCodecBase(name); if (mCodec == NULL) { return NAME_NOT_FOUND; } mCodecInfo.clear(); bool secureCodec = false; Loading Loading @@ -922,6 +925,11 @@ status_t MediaCodec::init(const AString &name) { return NAME_NOT_FOUND; } mCodec = GetCodecBase(name, mCodecInfo->getOwnerName()); if (mCodec == NULL) { return NAME_NOT_FOUND; } if (mIsVideo) { // video codec needs dedicated looper if (mCodecLooper == NULL) { Loading