summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-11-11 07:39:25 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-11 07:39:25 -0800
commit73b1fd56d99b356b0effe8cf96ecf7446beb207f (patch)
treee9de870ee19df7fc19a009cf084e4742acf5602a /media/libstagefright/rtsp
parent4ab3045755d33ab24bd312cfbc888f300c5e01f9 (diff)
parentf0c86a83c687074be79397e082e3775ca56641b1 (diff)
downloadframeworks_av-73b1fd56d99b356b0effe8cf96ecf7446beb207f.zip
frameworks_av-73b1fd56d99b356b0effe8cf96ecf7446beb207f.tar.gz
frameworks_av-73b1fd56d99b356b0effe8cf96ecf7446beb207f.tar.bz2
Merge "Instead of asserting, signal a runtime error if the session doesn't contain" into ics-mr1
Diffstat (limited to 'media/libstagefright/rtsp')
-rw-r--r--media/libstagefright/rtsp/MyHandler.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h
index 6a5efa4..0dd93be 100644
--- a/media/libstagefright/rtsp/MyHandler.h
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -463,8 +463,17 @@ struct MyHandler : public AHandler {
mBaseURL = tmp;
}
- CHECK_GT(mSessionDesc->countTracks(), 1u);
- setupTrack(1);
+ if (mSessionDesc->countTracks() < 2) {
+ // There's no actual tracks in this session.
+ // The first "track" is merely session meta
+ // data.
+
+ LOGW("Session doesn't contain any playable "
+ "tracks. Aborting.");
+ result = ERROR_UNSUPPORTED;
+ } else {
+ setupTrack(1);
+ }
}
}
}
@@ -783,9 +792,13 @@ struct MyHandler : public AHandler {
}
if (mNumAccessUnitsReceived == 0) {
+#if 0
LOGI("stream ended? aborting.");
(new AMessage('abor', id()))->post();
break;
+#else
+ LOGI("haven't seen an AU in a looong time.");
+#endif
}
mNumAccessUnitsReceived = 0;