Implemented synchronization during creation/playing/closing a remote stream.
The creation, playing and closing of remote streams are now inside synchronized methods. This is necessary because multiple threads might try to create and/or close the same stream at the same time.
This commit is contained in:
parent
3d47ab67b2
commit
f784f5839c
@ -175,7 +175,7 @@ public class VideoApplication extends MultiThreadedApplicationAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void streamPlayItemPlay(ISubscriberStream stream, IPlayItem item, boolean isLive) {
|
||||
public synchronized void streamPlayItemPlay(ISubscriberStream stream, IPlayItem item, boolean isLive) {
|
||||
// log w3c connect event
|
||||
String streamName = item.getName();
|
||||
|
||||
@ -207,7 +207,7 @@ public class VideoApplication extends MultiThreadedApplicationAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void streamSubscriberClose(ISubscriberStream stream) {
|
||||
public synchronized void streamSubscriberClose(ISubscriberStream stream) {
|
||||
super.streamSubscriberClose(stream);
|
||||
String streamName = stream.getBroadcastStreamPublishName();
|
||||
if(streamName.contains("/"))
|
||||
|
Loading…
Reference in New Issue
Block a user