aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-10-04 13:59:54 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-10-04 13:59:54 +0000
commit53a6a5258b5f9d72a830eef0b6692cb0bc9e3db6 (patch)
tree47a3f85e890ee44800521b1504938297e529ac4a /src
parent61a7030a2b482820983ff9615be5bc190f81439c (diff)
downloadjitsi-53a6a5258b5f9d72a830eef0b6692cb0bc9e3db6.zip
jitsi-53a6a5258b5f9d72a830eef0b6692cb0bc9e3db6.tar.gz
jitsi-53a6a5258b5f9d72a830eef0b6692cb0bc9e3db6.tar.bz2
Explicitly reduces method calls made in r8967, formats source code.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java b/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java
index 09be4f3..da078be 100644
--- a/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java
+++ b/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java
@@ -1464,21 +1464,27 @@ public class MediaStreamImpl
*/
public void setFormat(MediaFormat format)
{
- if (getDeviceSession() != null &&
- getDeviceSession().getFormat() != null &&
- getDeviceSession().getFormat().equals(format))
- return;
+ MediaDeviceSession deviceSession = getDeviceSession();
+ MediaFormat deviceSessionFormat = null;
+
+ if (deviceSession != null)
+ {
+ deviceSessionFormat = deviceSession.getFormat();
+ if ((deviceSessionFormat != null)
+ && deviceSessionFormat.equals(format))
+ return;
+ }
if (logger.isTraceEnabled())
logger.trace(
"Changing format of stream " + hashCode()
- + " from: " + getDeviceSession().getFormat()
+ + " from: " + deviceSessionFormat
+ " to: " + format);
setAdvancedAttributes(format.getAdvancedAttributes());
handleAttributes(format, format.getAdvancedAttributes());
handleAttributes(format, format.getFormatParameters());
- getDeviceSession().setFormat(format);
+ deviceSession.setFormat(format);
}
/**