diff options
author | Robert Shih <robertshih@google.com> | 2015-04-24 16:56:53 -0700 |
---|---|---|
committer | Robert Shih <robertshih@google.com> | 2015-04-28 17:24:20 -0700 |
commit | 1e2a0e6adc3d70879b00e5295c54a74209b71e1b (patch) | |
tree | 39d76943dc23724b6e2ff7b6118ebede5b77534e /media/libstagefright/matroska | |
parent | f105b28e94c50802cab61ec4cdf4986e9dd3c097 (diff) | |
download | frameworks_av-1e2a0e6adc3d70879b00e5295c54a74209b71e1b.zip frameworks_av-1e2a0e6adc3d70879b00e5295c54a74209b71e1b.tar.gz frameworks_av-1e2a0e6adc3d70879b00e5295c54a74209b71e1b.tar.bz2 |
MatroskaExtractor: skip track when codec id is NULL in addTracks
This is a more thorough version of commit
ea9ac8bf7f6a7ae1424c6cade64b004caa7c3681
in that it applies to both video and audio.
Bug: 17702053
Bug: 18872598
Change-Id: Idcea77bb7133ea0d02da8c484b4a0791db42740e
Diffstat (limited to 'media/libstagefright/matroska')
-rw-r--r-- | media/libstagefright/matroska/MatroskaExtractor.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp index ddca437..70d2c69 100644 --- a/media/libstagefright/matroska/MatroskaExtractor.cpp +++ b/media/libstagefright/matroska/MatroskaExtractor.cpp @@ -925,6 +925,11 @@ void MatroskaExtractor::addTracks() { ALOGV("codec id = %s", codecID); ALOGV("codec name = %s", track->GetCodecNameAsUTF8()); + if (codecID == NULL) { + ALOGW("unknown codecID is not supported."); + continue; + } + size_t codecPrivateSize; const unsigned char *codecPrivate = track->GetCodecPrivate(codecPrivateSize); @@ -941,10 +946,7 @@ void MatroskaExtractor::addTracks() { const mkvparser::VideoTrack *vtrack = static_cast<const mkvparser::VideoTrack *>(track); - if (codecID == NULL) { - ALOGW("unknown codecID is not supported."); - continue; - } else if (!strcmp("V_MPEG4/ISO/AVC", codecID)) { + 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)) { |