[libbluray-devel] _update_clip_psrs(): validate current IG stream number
hpi1
git at videolan.org
Mon Apr 14 10:58:07 CEST 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Apr 14 11:08:17 2014 +0300| [a861f651afd2c4c9d89eaa350523328d482c3f7e] | committer: hpi1
_update_clip_psrs(): validate current IG stream number
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=a861f651afd2c4c9d89eaa350523328d482c3f7e
---
src/libbluray/bluray.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 40ba0ad..ddd960c 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -353,7 +353,7 @@ static void _update_clip_psrs(BLURAY *bd, NAV_CLIP *clip)
NULL, audio_lang);
}
- /* Validate selected audio and subtitle stream PSRs when using menus */
+ /* Validate selected audio, subtitle and IG stream PSRs when using menus */
} else {
uint32_t psr_val;
@@ -381,6 +381,15 @@ static void _update_clip_psrs(BLURAY *bd, NAV_CLIP *clip)
}
bd_psr_unlock(bd->regs);
}
+ if (stn->num_ig) {
+ bd_psr_lock(bd->regs);
+ psr_val = bd_psr_read(bd->regs, PSR_IG_STREAM_ID);
+ if ((psr_val == 0) || (psr_val > stn->num_ig)) {
+ bd_psr_write(bd->regs, PSR_IG_STREAM_ID, 1);
+ BD_DEBUG(DBG_BLURAY | DBG_CRIT, "Selected IG stream 1 (stream %d not available)\n", psr_val);
+ }
+ bd_psr_unlock(bd->regs);
+ }
}
}
More information about the libbluray-devel
mailing list