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

This commit is contained in:
Andreas Huber
2011-01-24 13:29:58 -08:00
committed by Android (Google) Code Review

View File

@@ -707,6 +707,12 @@ void MatroskaExtractor::addTracks() {
for (size_t index = 0; index < tracks->GetTracksCount(); ++index) { for (size_t index = 0; index < tracks->GetTracksCount(); ++index) {
const mkvparser::Track *track = tracks->GetTrackByIndex(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(); const char *const codecID = track->GetCodecId();
LOGV("codec id = %s", codecID); LOGV("codec id = %s", codecID);
LOGV("codec name = %s", track->GetCodecNameAsUTF8()); LOGV("codec name = %s", track->GetCodecNameAsUTF8());