summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-01-24 12:46:12 -0800
committerAndreas Huber <andih@google.com>2011-01-24 12:46:12 -0800
commitdfe8d9b1ffd016744504cd63a777d243fd2099ce (patch)
tree161ea763fd7b014bf4fad42f20e0aff9a999ec05 /media/libstagefright
parentda6f9295840b0e74f61afa273ce2a767d8148af7 (diff)
downloadframeworks_base-dfe8d9b1ffd016744504cd63a777d243fd2099ce.zip
frameworks_base-dfe8d9b1ffd016744504cd63a777d243fd2099ce.tar.gz
frameworks_base-dfe8d9b1ffd016744504cd63a777d243fd2099ce.tar.bz2
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
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/matroska/MatroskaExtractor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
index eca9ed6..733de92 100644
--- a/media/libstagefright/matroska/MatroskaExtractor.cpp
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -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());