summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp/ARTPConnection.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-08-30 15:25:35 -0700
committerAndreas Huber <andih@google.com>2010-08-30 15:25:35 -0700
commit7aef03379179c109c2547c33c410bfc93c8db576 (patch)
tree8626c3e08eaf9033548d22166af29bc3930eb8cc /media/libstagefright/rtsp/ARTPConnection.cpp
parent1c842b26ebbf64d15b6015b9a03d888829b946ef (diff)
downloadframeworks_av-7aef03379179c109c2547c33c410bfc93c8db576.zip
frameworks_av-7aef03379179c109c2547c33c410bfc93c8db576.tar.gz
frameworks_av-7aef03379179c109c2547c33c410bfc93c8db576.tar.bz2
Instead of closing the connection altogether if no UDP packets arrive after a certain time, try changing transports (to interleaved TCP). Also properly close the sockets on disconnection.
Change-Id: Ie8d6a3865a0477e28d4b76bb9038e468451287b1 related-to-bug: 2556656
Diffstat (limited to 'media/libstagefright/rtsp/ARTPConnection.cpp')
-rw-r--r--media/libstagefright/rtsp/ARTPConnection.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp
index 42a22b7..12f8f32 100644
--- a/media/libstagefright/rtsp/ARTPConnection.cpp
+++ b/media/libstagefright/rtsp/ARTPConnection.cpp
@@ -263,6 +263,10 @@ void ARTPConnection::onPollStreams() {
}
}
+ if (maxSocket == -1) {
+ return;
+ }
+
int res = select(maxSocket + 1, &rs, NULL, NULL, &tv);
CHECK_GE(res, 0);
@@ -292,6 +296,10 @@ void ARTPConnection::onPollStreams() {
it != mStreams.end(); ++it) {
StreamInfo *s = &*it;
+ if (s->mIsInjected) {
+ continue;
+ }
+
if (s->mNumRTCPPacketsReceived == 0) {
// We have never received any RTCP packets on this stream,
// we don't even know where to send a report.