[libbluray-devel] Update PSR_CHAPTER only if chapter list is not empty

hpi1 git at videolan.org
Sun Apr 17 14:28:15 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Apr 15 14:27:37 2016 +0300| [9d291cbcd1c2ca322b0b55444b2fcf737126095e] | committer: hpi1

Update PSR_CHAPTER only if chapter list is not empty

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=9d291cbcd1c2ca322b0b55444b2fcf737126095e
---

 src/libbluray/bluray.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 57d2d36..86a92e0 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -378,7 +378,7 @@ static int _is_interactive_title(BLURAY *bd)
 
 static void _update_chapter_psr(BLURAY *bd)
 {
-    if (!_is_interactive_title(bd)) {
+    if (!_is_interactive_title(bd) && bd->title->chap_list.count > 0) {
         uint32_t current_chapter = bd_get_current_chapter(bd);
         bd_psr_write(bd->regs, PSR_CHAPTER,  current_chapter + 1);
     }



More information about the libbluray-devel mailing list