Loading media/extractors/mp4/AC4Parser.cpp +12 −16 Original line number Diff line number Diff line Loading @@ -295,6 +295,7 @@ bool AC4DSIParser::parse() { bool b_single_substream_group = false; uint32_t presentation_config = 0, presentation_version = 0; uint32_t pres_bytes = 0; uint64_t start = 0; if (ac4_dsi_version == 0) { CHECK_BITS_LEFT(1 + 5 + 5); Loading @@ -315,6 +316,8 @@ bool AC4DSIParser::parse() { mBitReader.skipBits(pres_bytes * 8); continue; } /* record a marker, less the size of the presentation_config */ start = (mDSISize - mBitReader.numBitsLeft()) / 8; // ac4_presentation_v0_dsi(), ac4_presentation_v1_dsi() and ac4_presentation_v2_dsi() // all start with a presentation_config of 5 bits CHECK_BITS_LEFT(5); Loading @@ -338,9 +341,6 @@ bool AC4DSIParser::parse() { (presentation_config >= NELEM(PresentationConfig) ? "reserved" : PresentationConfig[presentation_config])); /* record a marker, less the size of the presentation_config */ uint64_t start = (mDSISize - mBitReader.numBitsLeft()) / 8; bool b_add_emdf_substreams = false; if (!b_single_substream_group && presentation_config == 6) { b_add_emdf_substreams = true; Loading Loading @@ -535,6 +535,7 @@ bool AC4DSIParser::parse() { } break; } } CHECK_BITS_LEFT(1 + 1); bool b_pre_virtualized = (mBitReader.getBits(1) == 1); mPresentations[presentation].mPreVirtualized = b_pre_virtualized; Loading @@ -543,7 +544,6 @@ bool AC4DSIParser::parse() { ALOGV("%u: b_add_emdf_substreams = %s\n", presentation, BOOLSTR(b_add_emdf_substreams)); } } if (b_add_emdf_substreams) { CHECK_BITS_LEFT(7); uint32_t n_add_emdf_substreams = mBitReader.getBits(7); Loading Loading @@ -599,10 +599,6 @@ bool AC4DSIParser::parse() { if (ac4_dsi_version == 1) { uint64_t end = (mDSISize - mBitReader.numBitsLeft()) / 8; if (mBitReader.numBitsLeft() % 8 != 0) { end += 1; } uint64_t presentation_bytes = end - start; uint64_t skip_bytes = pres_bytes - presentation_bytes; ALOGV("skipping = %" PRIu64 " bytes", skip_bytes); Loading Loading
media/extractors/mp4/AC4Parser.cpp +12 −16 Original line number Diff line number Diff line Loading @@ -295,6 +295,7 @@ bool AC4DSIParser::parse() { bool b_single_substream_group = false; uint32_t presentation_config = 0, presentation_version = 0; uint32_t pres_bytes = 0; uint64_t start = 0; if (ac4_dsi_version == 0) { CHECK_BITS_LEFT(1 + 5 + 5); Loading @@ -315,6 +316,8 @@ bool AC4DSIParser::parse() { mBitReader.skipBits(pres_bytes * 8); continue; } /* record a marker, less the size of the presentation_config */ start = (mDSISize - mBitReader.numBitsLeft()) / 8; // ac4_presentation_v0_dsi(), ac4_presentation_v1_dsi() and ac4_presentation_v2_dsi() // all start with a presentation_config of 5 bits CHECK_BITS_LEFT(5); Loading @@ -338,9 +341,6 @@ bool AC4DSIParser::parse() { (presentation_config >= NELEM(PresentationConfig) ? "reserved" : PresentationConfig[presentation_config])); /* record a marker, less the size of the presentation_config */ uint64_t start = (mDSISize - mBitReader.numBitsLeft()) / 8; bool b_add_emdf_substreams = false; if (!b_single_substream_group && presentation_config == 6) { b_add_emdf_substreams = true; Loading Loading @@ -535,6 +535,7 @@ bool AC4DSIParser::parse() { } break; } } CHECK_BITS_LEFT(1 + 1); bool b_pre_virtualized = (mBitReader.getBits(1) == 1); mPresentations[presentation].mPreVirtualized = b_pre_virtualized; Loading @@ -543,7 +544,6 @@ bool AC4DSIParser::parse() { ALOGV("%u: b_add_emdf_substreams = %s\n", presentation, BOOLSTR(b_add_emdf_substreams)); } } if (b_add_emdf_substreams) { CHECK_BITS_LEFT(7); uint32_t n_add_emdf_substreams = mBitReader.getBits(7); Loading Loading @@ -599,10 +599,6 @@ bool AC4DSIParser::parse() { if (ac4_dsi_version == 1) { uint64_t end = (mDSISize - mBitReader.numBitsLeft()) / 8; if (mBitReader.numBitsLeft() % 8 != 0) { end += 1; } uint64_t presentation_bytes = end - start; uint64_t skip_bytes = pres_bytes - presentation_bytes; ALOGV("skipping = %" PRIu64 " bytes", skip_bytes); Loading