sections were added to the KeyedVector.
Change-Id: I095b5452ccfad89d69fc502fb21ce39495e201c3
related-to-bug:
8754565
ssize_t sectionIndex = mPSISections.indexOfKey(PID);
if (sectionIndex >= 0) {
- const sp<PSISection> §ion = mPSISections.valueAt(sectionIndex);
+ sp<PSISection> section = mPSISections.valueAt(sectionIndex);
if (payload_unit_start_indicator) {
CHECK(section->isEmpty());
br->skipBits(skip * 8);
}
-
CHECK((br->numBitsLeft() % 8) == 0);
status_t err = section->append(br->data(), br->numBitsLeft() / 8);
if (!handled) {
mPSISections.removeItem(PID);
+ section.clear();
}
}
- section->clear();
+ if (section != NULL) {
+ section->clear();
+ }
return OK;
}