summaryrefslogtreecommitdiffstats
path: root/media/libavextensions
diff options
context:
space:
mode:
authorDiogo Ferreira <defer@cyngn.com>2016-01-22 14:42:31 +0000
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-01-22 14:22:20 -0800
commitdfcb22072eca593be848b762e49d4f7ab74bba13 (patch)
treeaad8d9cff0cfed481b83c9ff384ee9a0d8af48db /media/libavextensions
parentdf1c503b9dac70cd9b1c433215eea7661b5925da (diff)
downloadframeworks_av-dfcb22072eca593be848b762e49d4f7ab74bba13.zip
frameworks_av-dfcb22072eca593be848b762e49d4f7ab74bba13.tar.gz
frameworks_av-dfcb22072eca593be848b762e49d4f7ab74bba13.tar.bz2
AVUtils: hevc: Return 0 when codec data is malformed
This was returning ERROR_MALFORMED, which is a negative value, since the function prototype returns size_t, it would be converted to somewhere near 2**32 and would never fall into the actual error checking clause in AVUtils::HEVCMuxer::makeHEVCCodecSpecificData. Fixes android.mediastress.cts.HEVCR1080pAacLongPlayerTest#testPlay00 Ticket: CYNGNOS-1683 Change-Id: I13e6a76cb0ee4a6b730e1eb1023320b74a0539c7
Diffstat (limited to 'media/libavextensions')
-rw-r--r--media/libavextensions/stagefright/AVUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libavextensions/stagefright/AVUtils.cpp b/media/libavextensions/stagefright/AVUtils.cpp
index bdf5eb6..413026b 100644
--- a/media/libavextensions/stagefright/AVUtils.cpp
+++ b/media/libavextensions/stagefright/AVUtils.cpp
@@ -448,7 +448,7 @@ status_t AVUtils::HEVCMuxer::makeHEVCCodecSpecificData(
List<HEVCParamSet> picParamSets;
if ((*codecSpecificDataSize = parseHEVCCodecSpecificData(data, size,
- vidParamSets, seqParamSets, picParamSets)) <= 0) {
+ vidParamSets, seqParamSets, picParamSets)) == 0) {
ALOGE("cannot parser codec specific data, bailing out");
return ERROR_MALFORMED;
}
@@ -885,12 +885,12 @@ size_t AVUtils::HEVCMuxer::parseHEVCCodecSpecificData(
}
} else {
ALOGE("Only VPS, SPS and PPS Nal units are expected");
- return ERROR_MALFORMED;
+ return 0;
}
if (nextStartCode == NULL) {
ALOGE("Next start code is NULL");
- return ERROR_MALFORMED;
+ return 0;
}
// Move on to find the next parameter set