summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-11-11 11:51:12 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-11 11:51:12 -0800
commit516fb1dad0c434fd89624c418543d35436a5374c (patch)
tree286085944a07196af8a4886dec830a6020858ca1 /media
parent54500e5e15b8bc1fc646b7c79fee49ce075db614 (diff)
parent2e56cfcbc6072342813172c4a1bb9adb3f728c63 (diff)
downloadframeworks_av-516fb1dad0c434fd89624c418543d35436a5374c.zip
frameworks_av-516fb1dad0c434fd89624c418543d35436a5374c.tar.gz
frameworks_av-516fb1dad0c434fd89624c418543d35436a5374c.tar.bz2
am 40461ee7: am cd556b82: Merge "Instead of asserting, signal a runtime error if the session doesn\'t contain" into ics-mr1
* commit '40461ee70161d8568663332f72be2353b04c34e7': Instead of asserting, signal a runtime error if the session doesn't contain
Diffstat (limited to 'media')
-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 3789b8d..dca0954 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;