summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp/ARTPConnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/rtsp/ARTPConnection.cpp')
-rw-r--r--media/libstagefright/rtsp/ARTPConnection.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp
index a86ab74..e021b29 100644
--- a/media/libstagefright/rtsp/ARTPConnection.cpp
+++ b/media/libstagefright/rtsp/ARTPConnection.cpp
@@ -81,7 +81,8 @@ void ARTPConnection::addStream(
const sp<ASessionDescription> &sessionDesc,
size_t index,
const sp<AMessage> &notify,
- bool injected) {
+ bool injected,
+ bool isIPV6) {
sp<AMessage> msg = new AMessage(kWhatAddStream, this);
msg->setInt32("rtp-socket", rtpSocket);
msg->setInt32("rtcp-socket", rtcpSocket);
@@ -89,6 +90,7 @@ void ARTPConnection::addStream(
msg->setSize("index", index);
msg->setMessage("notify", notify);
msg->setInt32("injected", injected);
+ msg->setInt32("isIPV6", isIPV6);
msg->post();
}
@@ -145,6 +147,10 @@ void ARTPConnection::MakePortPair(
TRESPASS();
}
+size_t ARTPConnection::sockAddrSize() {
+ return sizeof(struct sockaddr_in);
+}
+
void ARTPConnection::onMessageReceived(const sp<AMessage> &msg) {
switch (msg->what()) {
case kWhatAddStream:
@@ -345,7 +351,7 @@ void ARTPConnection::onPollStreams() {
n = sendto(
s->mRTCPSocket, buffer->data(), buffer->size(), 0,
(const struct sockaddr *)&s->mRemoteRTCPAddr,
- sizeof(s->mRemoteRTCPAddr));
+ sockAddrSize());
} while (n < 0 && errno == EINTR);
if (n <= 0) {