Fix crashes caused by rendering to a surface on teardown
This commit is contained in:
@@ -37,6 +37,7 @@ public class NvVideoStream {
|
||||
private AvVideoDepacketizer depacketizer = new AvVideoDepacketizer();
|
||||
|
||||
private DecoderRenderer decrend;
|
||||
private boolean startedRendering;
|
||||
|
||||
private boolean aborting = false;
|
||||
|
||||
@@ -70,6 +71,10 @@ public class NvVideoStream {
|
||||
} catch (InterruptedException e) { }
|
||||
}
|
||||
|
||||
if (startedRendering) {
|
||||
decrend.stop();
|
||||
}
|
||||
|
||||
if (decrend != null) {
|
||||
decrend.release();
|
||||
}
|
||||
@@ -187,6 +192,7 @@ public class NvVideoStream {
|
||||
|
||||
// Start the renderer
|
||||
decrend.start();
|
||||
startedRendering = true;
|
||||
}
|
||||
};
|
||||
threads.add(t);
|
||||
|
||||
Reference in New Issue
Block a user