From ea9ac8bf7f6a7ae1424c6cade64b004caa7c3681 Mon Sep 17 00:00:00 2001 From: Robert Shih Date: Fri, 24 Apr 2015 16:56:53 -0700 Subject: MatroskaExtractor: skip track when codec id is NULL in addTracks Bug: 18872598 Change-Id: I0cdb2ffae202fc06b068c57dafae7523981b6000 --- media/libstagefright/matroska/MatroskaExtractor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'media') diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp index 0712bf0..ddca437 100644 --- a/media/libstagefright/matroska/MatroskaExtractor.cpp +++ b/media/libstagefright/matroska/MatroskaExtractor.cpp @@ -941,7 +941,10 @@ void MatroskaExtractor::addTracks() { const mkvparser::VideoTrack *vtrack = static_cast(track); - if (!strcmp("V_MPEG4/ISO/AVC", codecID)) { + if (codecID == NULL) { + ALOGW("unknown codecID is not supported."); + continue; + } else if (!strcmp("V_MPEG4/ISO/AVC", codecID)) { meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC); meta->setData(kKeyAVCC, 0, codecPrivate, codecPrivateSize); } else if (!strcmp("V_MPEG4/ISO/ASP", codecID)) { -- cgit v1.1