1
0
Fork 0

HDMV: detect infinite looping between graphics controller and HDMV VM

Fixes live lock with "Butterfly on the Wheel" by aborting playback.
The disc is broken:
UO mask allows jumping to root menu from language selection menu.
This skips on-disc menu initialization code, causing infinite loop
in root menu.
This commit is contained in:
hpi1 2015-02-09 13:55:14 +02:00
parent e73add9202
commit 60c023f305
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,5 @@
- Fix infinite loop with some broken HDMV menus
2015-01-26: Version 0.7.0
- Add player setting for BD-J persistent storage and cache paths.
- Add support for system fonts. BD-J fonts in jre/lib/fonts/ are not required anymore.

View File

@ -3169,6 +3169,7 @@ static int _read_ext(BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event)
/* run HDMV VM ? */
if (bd->title_type == title_hdmv) {
int loops = 0;
while (!bd->hdmv_suspended) {
if (_run_hdmv(bd) < 0) {
@ -3176,6 +3177,16 @@ static int _read_ext(BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event)
bd->title_type = title_undef;
return -1;
}
if (loops++ > 100) {
/* Detect infinite loops.
* Broken disc may cause infinite loop between graphics controller and HDMV VM.
* This happens ex. with "Butterfly on a Wheel":
* Triggering unmasked "Menu Call" UO in language selection menu skips
* menu system initialization code, resulting in infinite loop in root menu.
*/
BD_DEBUG(DBG_BLURAY | DBG_CRIT, "bd_read_ext(): detected possible HDMV mode live lock (%d loops)\n", loops);
_queue_event(bd, BD_EVENT_ERROR, BD_ERROR_HDMV);
}
if (_get_event(bd, event)) {
return 0;
}