From 79e250e999b7002dc39fa8ee31630fabde6132a8 Mon Sep 17 00:00:00 2001 From: James Dong Date: Tue, 15 May 2012 17:53:52 -0700 Subject: [PATCH] If number of audio channels returned is 0, report an error related-to-bug: 6500580 Change-Id: I55cab0bde30841c31f671d03f99c59d337fea564 --- proprietary/wvm/WVMExtractorImpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proprietary/wvm/WVMExtractorImpl.cpp b/proprietary/wvm/WVMExtractorImpl.cpp index 3f35a8e4..d4498cab 100644 --- a/proprietary/wvm/WVMExtractorImpl.cpp +++ b/proprietary/wvm/WVMExtractorImpl.cpp @@ -264,6 +264,11 @@ status_t WVMExtractorImpl::readMetaData() if (result != WV_Status_OK) return ERROR_MALFORMED; + if (numChannels == 0) { + ALOGD("numChannels is 0!"); + return ERROR_MALFORMED; + } + std::string durationString = WV_Info_GetDuration(mSession, "sec"); if (durationString == "") { // We won't have a duration for live streams, and Stagefright doesn't seem to