Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
frameworks_av
Commits
fb949d5d
Commit
fb949d5d
authored
11 years ago
by
Andreas Huber
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Fix crash in MyHandler when sockets are not set."
parents
f36ae7ca
b6f76424
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
17 deletions
+22
-17
media/libstagefright/rtsp/ARTSPConnection.cpp
media/libstagefright/rtsp/ARTSPConnection.cpp
+0
-1
media/libstagefright/rtsp/MyHandler.h
media/libstagefright/rtsp/MyHandler.h
+22
-16
No files found.
media/libstagefright/rtsp/ARTSPConnection.cpp
View file @
fb949d5d
...
...
@@ -483,7 +483,6 @@ void ARTSPConnection::onReceiveResponse() {
FD_SET
(
mSocket
,
&
rs
);
int
res
=
select
(
mSocket
+
1
,
&
rs
,
NULL
,
NULL
,
&
tv
);
CHECK_GE
(
res
,
0
);
if
(
res
==
1
)
{
MakeSocketBlocking
(
mSocket
,
true
);
...
...
This diff is collapsed.
Click to expand it.
media/libstagefright/rtsp/MyHandler.h
View file @
fb949d5d
...
...
@@ -686,23 +686,27 @@ struct MyHandler : public AHandler {
i
=
response
->
mHeaders
.
indexOfKey
(
"transport"
);
CHECK_GE
(
i
,
0
);
if
(
!
track
->
mUsingInterleavedTCP
)
{
AString
transport
=
response
->
mHeaders
.
valueAt
(
i
);
// We are going to continue even if we were
// unable to poke a hole into the firewall...
pokeAHole
(
track
->
mRTPSocket
,
track
->
mRTCPSocket
,
transport
);
}
if
(
track
->
mRTPSocket
!=
-
1
&&
track
->
mRTCPSocket
!=
-
1
)
{
if
(
!
track
->
mUsingInterleavedTCP
)
{
AString
transport
=
response
->
mHeaders
.
valueAt
(
i
);
// We are going to continue even if we were
// unable to poke a hole into the firewall...
pokeAHole
(
track
->
mRTPSocket
,
track
->
mRTCPSocket
,
transport
);
}
mRTPConn
->
addStream
(
track
->
mRTPSocket
,
track
->
mRTCPSocket
,
mSessionDesc
,
index
,
notify
,
track
->
mUsingInterleavedTCP
);
mRTPConn
->
addStream
(
track
->
mRTPSocket
,
track
->
mRTCPSocket
,
mSessionDesc
,
index
,
notify
,
track
->
mUsingInterleavedTCP
);
mSetupTracksSuccessful
=
true
;
mSetupTracksSuccessful
=
true
;
}
else
{
result
=
BAD_VALUE
;
}
}
}
...
...
@@ -724,7 +728,7 @@ struct MyHandler : public AHandler {
}
++
index
;
if
(
index
<
mSessionDesc
->
countTracks
())
{
if
(
result
==
OK
&&
index
<
mSessionDesc
->
countTracks
())
{
setupTrack
(
index
);
}
else
if
(
mSetupTracksSuccessful
)
{
++
mKeepAliveGeneration
;
...
...
@@ -1555,6 +1559,8 @@ private:
info
->
mUsingInterleavedTCP
=
false
;
info
->
mFirstSeqNumInSegment
=
0
;
info
->
mNewSegment
=
true
;
info
->
mRTPSocket
=
-
1
;
info
->
mRTCPSocket
=
-
1
;
info
->
mRTPAnchor
=
0
;
info
->
mNTPAnchorUs
=
-
1
;
info
->
mNormalPlayTimeRTP
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment