Bug 1365872 - remove parsing mp4v mCodecSpecificConfig which is for b2g. r=jya
authorAlfredo Yang <ayang@mozilla.com>
Thu, 18 May 2017 16:54:43 +0800
changeset 360311 2edb664cb628ada86f09a6cfe9aeeeab8d563f04
parent 360310 a040a09aa7a1e4b7077fe6656ab4ef0fc4ea030b
child 360312 ef182af1ccd7e18017036e6a68a07f9941ff2ac4
push id31873
push userarchaeopteryx@coole-files.de
push dateWed, 24 May 2017 09:23:57 +0000
treeherdermozilla-central@ffaa07672466 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1365872
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1365872 - remove parsing mp4v mCodecSpecificConfig which is for b2g. r=jya MozReview-Commit-ID: G3l6AtEH0hO
dom/media/platforms/omx/OmxDataDecoder.cpp
media/libstagefright/binding/DecoderData.cpp
--- a/dom/media/platforms/omx/OmxDataDecoder.cpp
+++ b/dom/media/platforms/omx/OmxDataDecoder.cpp
@@ -604,17 +604,17 @@ OmxDataDecoder::FillCodecConfigDataToOmx
   MOZ_ASSERT(mOmxState == OMX_StateIdle || mOmxState == OMX_StateExecuting);
 
 
   RefPtr<BufferData> inbuf = FindAvailableBuffer(OMX_DirInput);
   RefPtr<MediaByteBuffer> csc;
   if (mTrackInfo->IsAudio()) {
     csc = mTrackInfo->GetAsAudioInfo()->mCodecSpecificConfig;
   } else if (mTrackInfo->IsVideo()) {
-    csc = mTrackInfo->GetAsVideoInfo()->mCodecSpecificConfig;
+    csc = mTrackInfo->GetAsVideoInfo()->mExtraData;
   }
 
   MOZ_RELEASE_ASSERT(csc);
 
   // Some codecs like h264, its codec specific data is at the first packet, not in container.
   if (csc->Length()) {
     memcpy(inbuf->mBuffer->pBuffer,
            csc->Elements(),
--- a/media/libstagefright/binding/DecoderData.cpp
+++ b/media/libstagefright/binding/DecoderData.cpp
@@ -170,29 +170,16 @@ MP4VideoInfo::Update(const MetaData* aMe
   UpdateTrackInfo(*this, aMetaData, aMimeType);
   mDisplay.width = FindInt32(aMetaData, kKeyDisplayWidth);
   mDisplay.height = FindInt32(aMetaData, kKeyDisplayHeight);
   mImage.width = FindInt32(aMetaData, kKeyWidth);
   mImage.height = FindInt32(aMetaData, kKeyHeight);
   mRotation = VideoInfo::ToSupportedRotation(FindInt32(aMetaData, kKeyRotation));
 
   FindData(aMetaData, kKeyAVCC, mExtraData);
-  if (!mExtraData->Length()) {
-    if (FindData(aMetaData, kKeyESDS, mExtraData)) {
-      ESDS esds(mExtraData->Elements(), mExtraData->Length());
-
-      const void* data;
-      size_t size;
-      if (esds.getCodecSpecificInfo(&data, &size) == OK) {
-        const uint8_t* cdata = reinterpret_cast<const uint8_t*>(data);
-        mCodecSpecificConfig->AppendElements(cdata, size);
-      }
-    }
-  }
-
 }
 
 static void
 UpdateTrackProtectedInfo(mozilla::TrackInfo& aConfig,
                          const mp4parse_sinf_info& aSinf)
 {
   if (aSinf.is_encrypted != 0) {
     aConfig.mCrypto.mValid = true;