[libbluray-devel] Use correct clip in _find_pg_stream()

hpi1 git at videolan.org
Tue May 27 11:29:19 CEST 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue May 27 12:22:54 2014 +0300| [d55faca9d6958ed1572a2d8d2af3511d1ad36e07] | committer: hpi1

Use correct clip in _find_pg_stream()

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

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

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 8de2b05..9b822dd 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -421,7 +421,8 @@ static void _update_chapter_psr(BLURAY *bd)
 
 static int _find_pg_stream(BLURAY *bd, uint16_t *pid, int *sub_path_idx, unsigned *sub_clip_idx, uint8_t *char_code)
 {
-    MPLS_PI  *pi        = &bd->title->pl->play_item[0];
+    unsigned  main_clip_idx = bd->st0.clip->ref;
+    MPLS_PI  *pi        = &bd->title->pl->play_item[main_clip_idx];
     unsigned  pg_stream = bd_psr_read(bd->regs, PSR_PG_STREAM);
 
 #if 0



More information about the libbluray-devel mailing list