Commit af7de2b6 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

mediacodec: check getOutputBuffers and getInputBuffers

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent c6ebb2ca
......@@ -613,7 +613,15 @@ loopclean:
if (p_sys->get_input_buffers && p_sys->get_output_buffers) {
p_sys->input_buffers = (*env)->CallObjectMethod(env, p_sys->codec, p_sys->get_input_buffers);
if (CHECK_EXCEPTION()) {
msg_Err(p_dec, "Exception in MediaCodec.getInputBuffers (OpenDecoder)");
goto error;
}
p_sys->output_buffers = (*env)->CallObjectMethod(env, p_sys->codec, p_sys->get_output_buffers);
if (CHECK_EXCEPTION()) {
msg_Err(p_dec, "Exception in MediaCodec.getOutputBuffers (OpenDecoder)");
goto error;
}
p_sys->input_buffers = (*env)->NewGlobalRef(env, p_sys->input_buffers);
p_sys->output_buffers = (*env)->NewGlobalRef(env, p_sys->output_buffers);
}
......
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