Skip to content

Commit

Permalink
Update SrsEncoder.java
Browse files Browse the repository at this point in the history
  • Loading branch information
thegobot authored Mar 6, 2019
1 parent 3ce4b85 commit 826a822
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions library/src/main/java/net/ossrs/yasea/SrsEncoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,22 @@ public void stop() {

if (aencoder != null) {
Log.i(TAG, "stop aencoder");
aencoder.stop();
try {
aencoder.stop();
}catch (IllegalStateException e){
e.printStackTrace();
}
aencoder.release();
aencoder = null;
}

if (vencoder != null) {
Log.i(TAG, "stop vencoder");
vencoder.stop();
try {
vencoder.stop();
}catch (IllegalStateException e){
e.printStackTrace();
}
vencoder.release();
vencoder = null;
}
Expand Down

0 comments on commit 826a822

Please sign in to comment.