summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;