Backed out changeset bbea5fa74727 (bug 1361984) on request from jya. r=backout a=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sun, 14 May 2017 21:38:48 +0200
changeset 358350 e66dedabe582ba7b394aee4f89ed70fe389b3c46
parent 358349 626efff0df630961981fc6875571fe05725f3636
child 358385 4f45e56b828c9dba63586012672016cb610a3b14
push id31820
push userarchaeopteryx@coole-files.de
push dateSun, 14 May 2017 19:39:07 +0000
treeherdermozilla-central@e66dedabe582 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout, backout
bugs1361984
milestone55.0a1
backs outbbea5fa747270debfa40b10ea49392b6124f5085
first release with
nightly linux32
e66dedabe582 / 55.0a1 / 20170515100238 / files
nightly linux64
e66dedabe582 / 55.0a1 / 20170515100238 / files
nightly mac
e66dedabe582 / 55.0a1 / 20170515030205 / files
nightly win32
e66dedabe582 / 55.0a1 / 20170515030205 / files
nightly win64
e66dedabe582 / 55.0a1 / 20170515030205 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset bbea5fa74727 (bug 1361984) on request from jya. r=backout a=backout MozReview-Commit-ID: DxCysbtslYA
media/libstagefright/binding/AnnexB.cpp
--- a/media/libstagefright/binding/AnnexB.cpp
+++ b/media/libstagefright/binding/AnnexB.cpp
@@ -17,22 +17,22 @@ namespace mp4_demuxer
 
 static const uint8_t kAnnexBDelimiter[] = { 0, 0, 0, 1 };
 
 bool
 AnnexB::ConvertSampleToAnnexB(mozilla::MediaRawData* aSample, bool aAddSPS)
 {
   MOZ_ASSERT(aSample);
 
-  if (IsAnnexB(aSample)) {
+  if (!IsAVCC(aSample)) {
     return true;
   }
   MOZ_ASSERT(aSample->Data());
 
-  if (IsAVCC(aSample) && !ConvertSampleTo4BytesAVCC(aSample)) {
+  if (!ConvertSampleTo4BytesAVCC(aSample)) {
     return false;
   }
 
   if (aSample->Size() < 4) {
     // Nothing to do, it's corrupted anyway.
     return true;
   }
 
@@ -58,17 +58,17 @@ AnnexB::ConvertSampleToAnnexB(mozilla::M
 
   nsAutoPtr<MediaRawDataWriter> samplewriter(aSample->CreateWriter());
 
   if (!samplewriter->Replace(tmp.begin(), tmp.length())) {
     return false;
   }
 
   // Prepend the Annex B NAL with SPS and PPS tables to keyframes.
-  if (aAddSPS && aSample->mKeyframe && IsAVCC(aSample)) {
+  if (aAddSPS && aSample->mKeyframe) {
     RefPtr<MediaByteBuffer> annexB =
       ConvertExtraDataToAnnexB(aSample->mExtraData);
     if (!samplewriter->Prepend(annexB->Elements(), annexB->Length())) {
       return false;
     }
 
     // Prepending the NAL with SPS/PPS will mess up the encryption subsample
     // offsets. So we need to account for the extra bytes by increasing