[libbluray-devel] commit: Added BD_EVENT_END_OF_TITLE (hpi1 )

git at videolan.org git at videolan.org
Wed Dec 8 20:39:21 CET 2010


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Dec  8 21:38:10 2010 +0200| [4ba0af806cd244304a27378f6814876c78ebb049] | committer: hpi1 

Added BD_EVENT_END_OF_TITLE

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

 src/libbluray/bluray.c |    4 +++-
 src/libbluray/bluray.h |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 9a10b29..d3c2c43 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -1014,6 +1014,7 @@ int bd_read(BLURAY *bd, unsigned char *buf, int len)
                 if (st->clip == NULL) {
                     // We previously reached the last clip.  Nothing
                     // else to read.
+                    _queue_event(bd, (BD_EVENT){BD_EVENT_END_OF_TITLE, 0});
                     return 0;
                 }
                 if (clip_pkt >= st->clip->end_pkt) {
@@ -1026,7 +1027,8 @@ int bd_read(BLURAY *bd, unsigned char *buf, int len)
                     st->clip = nav_next_clip(bd->title, st->clip);
                     if (st->clip == NULL) {
                         DEBUG(DBG_BLURAY|DBG_STREAM, "End of title (%p)\n", bd);
-                        return out_len;
+                        _queue_event(bd, (BD_EVENT){BD_EVENT_END_OF_TITLE, 0});
+                        return 0;
                     }
                     if (!_open_m2ts(bd, st)) {
                         return -1;
diff --git a/src/libbluray/bluray.h b/src/libbluray/bluray.h
index 5d60bf6..ee85aab 100644
--- a/src/libbluray/bluray.h
+++ b/src/libbluray/bluray.h
@@ -457,6 +457,7 @@ typedef enum {
     BD_EVENT_PLAYLIST,  /* current playlist (xxxxx.mpls) */
     BD_EVENT_PLAYITEM,  /* current play item */
     BD_EVENT_CHAPTER,   /* current chapter, 1...N */
+    BD_EVENT_END_OF_TITLE,
 
     /* stream selection */
     BD_EVENT_AUDIO_STREAM,           /* 1..32,  0xff  = none */



More information about the libbluray-devel mailing list