The .mkv parser lib leaves some tracks NULL if it doesn't support them.

But it still counts them as valid tracks...

Change-Id: I77e8fd24cce91a586e8e418759db55b6eba449c0
related-to-bug: 3377186
This commit is contained in:
Andreas Huber
2011-01-24 12:46:12 -08:00
parent da6f929584
commit dfe8d9b1ff

View File

@@ -707,6 +707,12 @@ void MatroskaExtractor::addTracks() {
for (size_t index = 0; index < tracks->GetTracksCount(); ++index) {
const mkvparser::Track *track = tracks->GetTrackByIndex(index);
if (track == NULL) {
// Apparently this is currently valid (if unexpected) behaviour
// of the mkv parser lib.
continue;
}
const char *const codecID = track->GetCodecId();
LOGV("codec id = %s", codecID);
LOGV("codec name = %s", track->GetCodecNameAsUTF8());