Bug 1347834 - retrieve audio codec specific config from rust parser. r=kinetik
authorAlfredo.Yang <ayang@mozilla.com>
Thu, 16 Mar 2017 16:06:28 +0800
changeset 348386 51c124a0f50b6484c40fe47878430a1a79a618bf
parent 348385 a15183cf83068238ed9da8d5e0286db788908c29
child 348387 32e03588ec39f9ecf41c359bccd428b3ea74d034
push id39137
push userayang@mozilla.com
push dateMon, 20 Mar 2017 01:27:31 +0000
treeherderautoland@32e03588ec39 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1347834
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 1347834 - retrieve audio codec specific config from rust parser. r=kinetik MozReview-Commit-ID: 2x4sN0e7c5j
media/libstagefright/binding/DecoderData.cpp
--- a/media/libstagefright/binding/DecoderData.cpp
+++ b/media/libstagefright/binding/DecoderData.cpp
@@ -233,20 +233,24 @@ MP4AudioInfo::Update(const mp4parse_trac
   mTrackId = track->track_id;
 
   // In stagefright, mProfile is kKeyAACProfile, mExtendedProfile is kKeyAACAOT.
   // Both are from audioObjectType in AudioSpecificConfig.
   if (audio->profile <= 4) {
     mProfile = audio->profile;
   }
 
-  const uint8_t* cdata = audio->codec_specific_config.data;
-  size_t size = audio->codec_specific_config.length;
-  if (size > 0) {
-    mCodecSpecificConfig->AppendElements(cdata, size);
+  if (audio->codec_specific_config.length > 0) {
+    mExtraData->AppendElements(audio->codec_specific_config.data,
+                               audio->codec_specific_config.length);
+  }
+
+  if (audio->codec_specific_data.length > 0) {
+    mCodecSpecificConfig->AppendElements(audio->codec_specific_data.data,
+                                         audio->codec_specific_data.length);
   }
 }
 
 void
 MP4VideoInfo::Update(const mp4parse_track_info* track,
                      const mp4parse_track_video_info* video)
 {
   UpdateTrackProtectedInfo(*this, video->protected_data);