[libbluray-devel] Store PID of mainpath embedded IG stream

hpi1 git at videolan.org
Mon Nov 21 08:30:32 CET 2011


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Nov 21 09:29:16 2011 +0200| [b9471c05be5aae29d2d37f22366d085b3312b61c] | committer: hpi1

Store PID of mainpath embedded IG stream

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

 src/libbluray/bluray.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 99ecebf..2f01885 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -102,6 +102,7 @@ struct bluray {
     /* streams */
     BD_STREAM      st0; /* main path */
     BD_PRELOAD     st_ig; /* preloaded IG stream sub path */
+    int            ig_pid; /* pid of currently selected IG stream in main path */
 
     /* buffer for bd_read(): current aligned unit of main stream (st0) */
     uint8_t        int_buf[6144];
@@ -1305,6 +1306,8 @@ static int _init_ig_stream(BLURAY *bd)
     int      ig_subpath = -1;
     uint16_t ig_pid     = 0;
 
+    bd->ig_pid = 0;
+
     if (!bd->graphics_controller) {
         return 0;
     }
@@ -1317,6 +1320,12 @@ static int _init_ig_stream(BLURAY *bd)
         return 1;
     }
 
+    /* store PID of main path embedded IG stream */
+    if (ig_subpath < 0) {
+        bd->ig_pid = ig_pid;
+        return 1;
+    }
+
     return 0;
 }
 



More information about the libbluray-devel mailing list