Fix getLastReceivedStatistics method, fixes #139
This commit is contained in:
parent
64d380290a
commit
e3ea69a58e
@ -157,7 +157,7 @@ public class FFmpegSession extends AbstractSession implements Session {
|
||||
public Statistics getLastReceivedStatistics() {
|
||||
synchronized (statisticsLock) {
|
||||
if (statistics.size() > 0) {
|
||||
return statistics.get(0);
|
||||
return statistics.get(statistics.size() - 1);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -116,7 +116,7 @@
|
||||
|
||||
[_statisticsLock lock];
|
||||
if ([_statistics count] > 0) {
|
||||
lastStatistics = [_statistics objectAtIndex:0];
|
||||
lastStatistics = [_statistics objectAtIndex:[_statistics count] - 1];
|
||||
}
|
||||
[_statisticsLock unlock];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user