Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libjitsi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZRTP
libjitsi
Commits
566b354d
Commit
566b354d
authored
12 years ago
by
Lyubomir Marinov
Browse files
Options
Downloads
Patches
Plain Diff
Fixes a NullPointerException during video conference calls. Reported by Emil Ivov.
parent
ffd50d1a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/org/jitsi/impl/neomedia/MediaStreamImpl.java
+13
-7
13 additions, 7 deletions
src/org/jitsi/impl/neomedia/MediaStreamImpl.java
src/org/jitsi/impl/neomedia/RTPTranslatorImpl.java
+24
-1
24 additions, 1 deletion
src/org/jitsi/impl/neomedia/RTPTranslatorImpl.java
with
37 additions
and
8 deletions
src/org/jitsi/impl/neomedia/MediaStreamImpl.java
+
13
−
7
View file @
566b354d
...
@@ -2062,16 +2062,21 @@ private Iterable<SendStream> stopSendStreams(
...
@@ -2062,16 +2062,21 @@ private Iterable<SendStream> stopSendStreams(
return
null
;
return
null
;
for
(
SendStream
sendStream
:
sendStreams
)
for
(
SendStream
sendStream
:
sendStreams
)
{
try
try
{
{
if
(
logger
.
isTraceEnabled
())
if
(
logger
.
isTraceEnabled
())
logger
.
trace
(
"Stopping send stream with hashcode "
{
+
sendStream
.
hashCode
());
logger
.
trace
(
"Stopping send stream with hashcode "
+
sendStream
.
hashCode
());
}
sendStream
.
getDataSource
().
stop
();
sendStream
.
getDataSource
().
stop
();
sendStream
.
stop
();
sendStream
.
stop
();
if
(
close
)
if
(
close
)
{
try
try
{
{
sendStream
.
close
();
sendStream
.
close
();
...
@@ -2089,16 +2094,17 @@ private Iterable<SendStream> stopSendStreams(
...
@@ -2089,16 +2094,17 @@ private Iterable<SendStream> stopSendStreams(
* SendStreams, ignore the exception here just in case
* SendStreams, ignore the exception here just in case
* because we already ignore IOExceptions.
* because we already ignore IOExceptions.
*/
*/
logger
logger
.
error
(
.
error
(
"Failed to close send stream "
+
sendStream
,
"Failed to close stream "
+
sendStream
,
npe
);
npe
);
}
}
}
}
}
catch
(
IOException
ioe
)
catch
(
IOException
ioe
)
{
{
logger
.
warn
(
"Failed to stop stream "
+
sendStream
,
ioe
);
logger
.
warn
(
"Failed to stop
send
stream "
+
sendStream
,
ioe
);
}
}
}
return
sendStreams
;
return
sendStreams
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/org/jitsi/impl/neomedia/RTPTranslatorImpl.java
+
24
−
1
View file @
566b354d
...
@@ -155,6 +155,15 @@ private synchronized void closeFakeSendStreamIfNotNecessary()
...
@@ -155,6 +155,15 @@ private synchronized void closeFakeSendStreamIfNotNecessary()
{
{
fakeSendStream
.
close
();
fakeSendStream
.
close
();
}
}
catch
(
NullPointerException
npe
)
{
/*
* Refer to MediaStreamImpl#stopSendStreams(
* Iterable<SendStream>, boolean) for an explanation about
* the swallowing of the exception.
*/
logger
.
error
(
"Failed to close fake send stream"
,
npe
);
}
finally
finally
{
{
fakeSendStream
=
null
;
fakeSendStream
=
null
;
...
@@ -180,7 +189,21 @@ private synchronized void closeSendStream(SendStreamDesc sendStreamDesc)
...
@@ -180,7 +189,21 @@ private synchronized void closeSendStream(SendStreamDesc sendStreamDesc)
if
(
sendStreams
.
contains
(
sendStreamDesc
)
if
(
sendStreams
.
contains
(
sendStreamDesc
)
&&
(
sendStreamDesc
.
getSendStreamCount
()
<
1
))
&&
(
sendStreamDesc
.
getSendStreamCount
()
<
1
))
{
{
sendStreamDesc
.
sendStream
.
close
();
SendStream
sendStream
=
sendStreamDesc
.
sendStream
;
try
{
sendStream
.
close
();
}
catch
(
NullPointerException
npe
)
{
/*
* Refer to MediaStreamImpl#stopSendStreams(
* Iterable<SendStream>, boolean) for an explanation about the
* swallowing of the exception.
*/
logger
.
error
(
"Failed to close send stream"
,
npe
);
}
sendStreams
.
remove
(
sendStreamDesc
);
sendStreams
.
remove
(
sendStreamDesc
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment