[jitsi-dev] [jitsi/libjitsi] [Jitsi|libjitsi] MediaStreamImpl.java error - mediaStreamStatsImpl access prior to initialization (#209)


#1

Need to change the order of execution in MediaStreamImpl constructor as shown in the patch. Otherwise mediaStreamStatsImpl was accessed in StatisticsEngine constructor before it is being initialized.

Index: MediaStreamImpl.java

···

===================================================================
--- MediaStreamImpl.java (revision 2300)
+++ MediaStreamImpl.java (working copy)
@@ -417,11 +417,13 @@

         this.srtpControl.registerUser(this);

+ // Need to init mediaStreamStatsImpl before setConnector(connector)
+ // access via getMediaStreamStats() by => StatisticsEngine constructor
+ this.mediaStreamStatsImpl = new MediaStreamStats2Impl(this);
+
         if (connector != null)
             setConnector(connector);

- this.mediaStreamStatsImpl = new MediaStreamStats2Impl(this);
-
         if (logger.isTraceEnabled())
         {
             logger.trace(

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/209


#2

Closed #209 via #225.

···

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/209#event-906638559