vlc/vlc-2.2 | branch: master | Thomas Guillem <[email protected]> | Thu Oct 23 12:56:43 2014 +0200| [72b2b969cf3daa0f548b76b10ffe7533b14c904c] | committer: Jean-Baptiste Kempf
mediacodec: cleanly abort DecodeVideo if GetOutput failed - Fix possible infinite loop with sw rendering if GetOutput failed. - Don't return a pic and don't release the block in case of error_state. Signed-off-by: Jean-Baptiste Kempf <[email protected]> (cherry picked from commit ab4c04f2f5545dcc3cae7ebffe8d28f3e2c5a915) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=72b2b969cf3daa0f548b76b10ffe7533b14c904c --- modules/codec/omxil/android_mediacodec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/codec/omxil/android_mediacodec.c b/modules/codec/omxil/android_mediacodec.c index e703295..85bcc60 100644 --- a/modules/codec/omxil/android_mediacodec.c +++ b/modules/codec/omxil/android_mediacodec.c @@ -936,6 +936,8 @@ static picture_t *DecodeVideo(decoder_t *p_dec, block_t **pp_block) if (index < 0) { GetOutput(p_dec, env, &p_pic, timeout); + if (p_sys->error_state) + break; if (p_pic) { /* If we couldn't get an available input buffer but a * decoded frame is available, we return the frame @@ -998,6 +1000,12 @@ static picture_t *DecodeVideo(decoder_t *p_dec, block_t **pp_block) p_sys->decoded = true; break; } + if (p_sys->error_state) { + if (p_pic) + decoder_DeletePicture(p_dec, p_pic); + jni_detach_thread(); + return NULL; + } if (!p_pic) GetOutput(p_dec, env, &p_pic, 0); (*myVm)->DetachCurrentThread(myVm); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
