Commit 0103fd95 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

MediaCodec: handle exceptions on Flush

parent 6ee40754
......@@ -506,8 +506,13 @@ static picture_t *DecodeVideo(decoder_t *p_dec, block_t **pp_block)
if (p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED)) {
block_Release(p_block);
if (p_sys->decoded)
if (p_sys->decoded) {
(*env)->CallVoidMethod(env, p_sys->codec, p_sys->flush);
if ((*env)->ExceptionOccurred(env)) {
msg_Warn(p_dec, "Exception occurred in MediaCodec.flush");
(*env)->ExceptionClear(env);
}
}
p_sys->decoded = 0;
(*myVm)->DetachCurrentThread(myVm);
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment