Also log a warning if MediaCodec.configure() threw an exception.
This fixes issues when playing back H264 over RTSP on devices
supporting MediaCodec - this makes it fall back cleanly to other
decoders. (The actual issue with playing back these streams is
not investigated yet.)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
(*env)->CallVoidMethod(env, p_sys->codec, p_sys->configure, format, NULL, NULL, 0);
if ((*env)->ExceptionOccurred(env)) {
(*env)->CallVoidMethod(env, p_sys->codec, p_sys->configure, format, NULL, NULL, 0);
if ((*env)->ExceptionOccurred(env)) {
+ msg_Warn(p_dec, "Exception occurred in MediaCodec.configure");
(*env)->ExceptionClear(env);
goto error;
}
(*env)->CallVoidMethod(env, p_sys->codec, p_sys->start);
(*env)->ExceptionClear(env);
goto error;
}
(*env)->CallVoidMethod(env, p_sys->codec, p_sys->start);
+ if ((*env)->ExceptionOccurred(env)) {
+ msg_Warn(p_dec, "Exception occurred in MediaCodec.start");
+ (*env)->ExceptionClear(env);
+ goto error;
+ }
p_sys->started = 1;
p_sys->input_buffers = (*env)->CallObjectMethod(env, p_sys->codec, p_sys->get_input_buffers);
p_sys->started = 1;
p_sys->input_buffers = (*env)->CallObjectMethod(env, p_sys->codec, p_sys->get_input_buffers);