summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-12-16 11:31:13 -0800
committerAndreas Huber <andih@google.com>2010-12-16 11:31:13 -0800
commit6e6b1cae2bac1b78205cefab8e4e9e9538982965 (patch)
tree5e24d334e4990f31c43ef505faa982d1dcae04f3 /media/libstagefright
parent5a7f242cfc0bd3b5208c21c27c0f5f348e98a0dc (diff)
downloadframeworks_av-6e6b1cae2bac1b78205cefab8e4e9e9538982965.zip
frameworks_av-6e6b1cae2bac1b78205cefab8e4e9e9538982965.tar.gz
frameworks_av-6e6b1cae2bac1b78205cefab8e4e9e9538982965.tar.bz2
Instead of asserting, gracefully abort and signal and error.
Change-Id: I170a602ed80e6c85a94e46deadfc02aaf92bfebb
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/httplive/LiveSession.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp
index 62567be..30ac404 100644
--- a/media/libstagefright/httplive/LiveSession.cpp
+++ b/media/libstagefright/httplive/LiveSession.cpp
@@ -349,7 +349,11 @@ void LiveSession::onDownloadNext() {
bool firstTime = (mPlaylist == NULL);
mPlaylist = fetchPlaylist(url.c_str());
- CHECK(mPlaylist != NULL);
+ if (mPlaylist == NULL) {
+ LOGE("failed to load playlist at url '%s'", url.c_str());
+ mDataSource->queueEOS(ERROR_IO);
+ return;
+ }
if (firstTime) {
Mutex::Autolock autoLock(mLock);
@@ -446,7 +450,11 @@ void LiveSession::onDownloadNext() {
sp<ABuffer> buffer;
status_t err = fetchFile(uri.c_str(), &buffer);
- CHECK_EQ(err, (status_t)OK);
+ if (err != OK) {
+ LOGE("failed to fetch .ts segment at url '%s'", uri.c_str());
+ mDataSource->queueEOS(err);
+ return;
+ }
CHECK_EQ((status_t)OK,
decryptBuffer(mSeqNumber - firstSeqNumberInPlaylist, buffer));