Loading media/extractors/ogg/OggExtractor.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -1062,8 +1062,15 @@ media_status_t MyOpusExtractor::verifyOpusHeader(MediaBufferHelper *buffer) { size_t size = buffer->range_length(); if (size < kOpusHeaderSize || memcmp(data, "OpusHead", 8) || /* version = */ data[8] != 1) { || memcmp(data, "OpusHead", 8)) { return AMEDIA_ERROR_MALFORMED; } // allow both version 0 and 1. Per the opus specification: // An earlier draft of the specification described a version 0, but the only difference // between version 1 and version 0 is that version 0 did not specify the semantics for // handling the version field if ( /* version = */ data[8] > 1) { ALOGW("no support for opus version %d", data[8]); return AMEDIA_ERROR_MALFORMED; } Loading Loading
media/extractors/ogg/OggExtractor.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -1062,8 +1062,15 @@ media_status_t MyOpusExtractor::verifyOpusHeader(MediaBufferHelper *buffer) { size_t size = buffer->range_length(); if (size < kOpusHeaderSize || memcmp(data, "OpusHead", 8) || /* version = */ data[8] != 1) { || memcmp(data, "OpusHead", 8)) { return AMEDIA_ERROR_MALFORMED; } // allow both version 0 and 1. Per the opus specification: // An earlier draft of the specification described a version 0, but the only difference // between version 1 and version 0 is that version 0 did not specify the semantics for // handling the version field if ( /* version = */ data[8] > 1) { ALOGW("no support for opus version %d", data[8]); return AMEDIA_ERROR_MALFORMED; } Loading