Bug 1407063 - Fix non-unified build in MPEG4Extractor.cpp. r?gerald draft
authorPhilippe Normand <philn@igalia.com>
Thu, 05 Oct 2017 15:57:12 +0200
changeset 677021 66d9ac60a8c23c7f02ae07e732a43ba18fa53fe3
parent 677020 6c2142793b8da6b14b44c586aec0d7f24f849b5c
child 677022 383711647d34b916973d5af49001205394d5fc41
push id83665
push userbmo:cpearce@mozilla.com
push dateMon, 09 Oct 2017 21:50:20 +0000
reviewersgerald
bugs1407063
milestone58.0a1
Bug 1407063 - Fix non-unified build in MPEG4Extractor.cpp. r?gerald Calls to fallible need to be prefixed by the mozilla namespace because it's not declared as globally usable. MozReview-Commit-ID: CJoAoTjXGUH
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
--- a/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
@@ -604,17 +604,17 @@ status_t MPEG4Extractor::parseDrmSINF(of
             SINF *sinf = mFirstSINF;
             while (sinf && (sinf->IPMPDescriptorID != id)) {
                 sinf = sinf->next;
             }
             if (sinf == NULL) {
                 return ERROR_MALFORMED;
             }
             sinf->len = dataLen - 3;
-            sinf->IPMPData = new (fallible) char[sinf->len];
+            sinf->IPMPData = new (mozilla::fallible) char[sinf->len];
             if (!sinf->IPMPData) {
                 return -ENOMEM;
             }
 
             if (mDataSource->readAt(data_offset + 2, sinf->IPMPData, sinf->len) < sinf->len) {
                 return ERROR_IO;
             }
             data_offset += sinf->len;
@@ -1042,17 +1042,17 @@ status_t MPEG4Extractor::parseChunk(off6
             }
 
             if (mDataSource->readAt(data_offset + 4, &pssh.uuid, 16) < 16) {
                 return ERROR_IO;
             }
 
             // Copy the contents of the box (including header) verbatim.
             pssh.datalen = chunk_data_size + 8;
-            pssh.data = new (fallible) uint8_t[pssh.datalen];
+            pssh.data = new (mozilla::fallible) uint8_t[pssh.datalen];
             if (!pssh.data) {
                 return -ENOMEM;
             }
             if (mDataSource->readAt(data_offset - 8, pssh.data, pssh.datalen) < pssh.datalen) {
                 return ERROR_IO;
             }
 
             mPssh.AppendElement(pssh);
@@ -1674,17 +1674,17 @@ status_t MPEG4Extractor::parseChunk(off6
 
         case FOURCC('a', 'v', 'c', 'C'):
         {
             if (chunk_data_size < 7) {
               ALOGE("short avcC chunk (%" PRId64 " bytes)", int64_t(chunk_data_size));
               return ERROR_MALFORMED;
             }
 
-            sp<ABuffer> buffer = new (fallible) ABuffer(chunk_data_size);
+            sp<ABuffer> buffer = new (mozilla::fallible) ABuffer(chunk_data_size);
             if (!buffer.get() || !buffer->data()) {
                 return -ENOMEM;
             }
 
             if (mDataSource->readAt(
                         data_offset, buffer->data(), chunk_data_size) < chunk_data_size) {
                 return ERROR_IO;
             }
@@ -1909,17 +1909,17 @@ status_t MPEG4Extractor::parseChunk(off6
                     kKeyTextFormatData, &type, &data, &size)) {
                 size = 0;
             }
 
             // Make sure (size + chunk_size) isn't going to overflow.
             if (size >= kMAX_ALLOCATION - chunk_size) {
                 return ERROR_MALFORMED;
             }
-            uint8_t *buffer = new (fallible) uint8_t[size + chunk_size];
+            uint8_t *buffer = new (mozilla::fallible) uint8_t[size + chunk_size];
             if (!buffer) {
                 return -ENOMEM;
             }
 
             if (size > 0) {
                 memcpy(buffer, data, size);
             }
 
@@ -1944,17 +1944,17 @@ status_t MPEG4Extractor::parseChunk(off6
         {
             if (mFileMetaData != NULL) {
                 ALOGV("chunk_data_size = %lld and data_offset = %lld",
                         chunk_data_size, data_offset);
                 const int kSkipBytesOfDataBox = 16;
                 if (chunk_data_size <= kSkipBytesOfDataBox) {
                   return ERROR_MALFORMED;
                 }
-                sp<ABuffer> buffer = new (fallible) ABuffer(chunk_data_size + 1);
+                sp<ABuffer> buffer = new (mozilla::fallible) ABuffer(chunk_data_size + 1);
                 if (!buffer.get() || !buffer->data()) {
                     return -ENOMEM;
                 }
                 if (mDataSource->readAt(
                     data_offset, buffer->data(), chunk_data_size) != (ssize_t)chunk_data_size) {
                     return ERROR_IO;
                 }
                 mFileMetaData->setData(