[vlc-devel] [PATCH 5/5] mediacodec: try next decoder in case of error
Thomas Guillem
thomas at gllm.fr
Wed Jun 3 17:35:45 CEST 2015
---
modules/codec/omxil/mediacodec.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index 28e41ea..b2dfdd4 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -50,7 +50,6 @@
/* JNI functions to get/set an Android Surface object. */
extern jobject jni_LockAndGetAndroidJavaSurface();
extern void jni_UnlockAndroidSurface();
-extern void jni_EventHardwareAccelerationError();
/* Implementation of a circular buffer of timestamps with overwriting
* of older values. MediaCodec has only one type of timestamp, if a
@@ -154,7 +153,6 @@ struct decoder_sys_t
int i_height;
bool decoded;
- bool error_state;
bool b_new_block;
bool b_support_interlaced;
@@ -899,9 +897,6 @@ static picture_t *DecodeVideo(decoder_t *p_dec, block_t **pp_block)
bool b_delayed_start = false;
bool b_new_block = p_block ? p_sys->b_new_block : false;
- if (p_sys->error_state)
- goto endclean;
-
if (p_block && p_block->i_flags & BLOCK_FLAG_INTERLACED_MASK
&& !p_sys->api->b_support_interlaced)
{
@@ -1062,11 +1057,8 @@ endclean:
*pp_block = NULL;
p_sys->b_new_block = true;
}
- if (b_error && !p_sys->error_state) {
- /* Signal the error to the Java. */
- jni_EventHardwareAccelerationError();
- p_sys->error_state = true;
- }
+ if (b_error)
+ p_dec->b_try_next = true;
return p_pic;
}
--
2.1.4
More information about the vlc-devel
mailing list