summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/matroska
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2013-03-27 19:04:12 -0700
committerLajos Molnar <lajos@google.com>2013-03-27 20:12:49 -0700
commite467ef084b75b074d0081616080b54212a7024c8 (patch)
tree2a1e22887679b1f20b9a960e4919535bdf8cee2a /media/libstagefright/matroska
parent4b6ed7f255b696d1555ce71633ea08c961ec51dd (diff)
downloadframeworks_av-e467ef084b75b074d0081616080b54212a7024c8.zip
frameworks_av-e467ef084b75b074d0081616080b54212a7024c8.tar.gz
frameworks_av-e467ef084b75b074d0081616080b54212a7024c8.tar.bz2
stagefright: matroska: don't crash on parsing error
MatroskaExtractor crashed with an assertion if mkvparser::ParseNext() returned a negative number. Now handle all error values the same way as the EOF. Change-Id: I173c4f878d692a0cbdb915ad1118d0686249d625 Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 8433794
Diffstat (limited to 'media/libstagefright/matroska')
-rw-r--r--media/libstagefright/matroska/MatroskaExtractor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
index 7fc7037..b304749 100644
--- a/media/libstagefright/matroska/MatroskaExtractor.cpp
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -263,8 +263,8 @@ void BlockIterator::advance_l() {
mCluster, nextCluster, pos, len);
ALOGV("ParseNext returned %ld", res);
- if (res > 0) {
- // EOF
+ if (res != 0) {
+ // EOF or error
mCluster = NULL;
break;