[libbluray-devel] commit: Split bd_read() at clip boundary. (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:30:28 2010 +0200| [3c548f946f9067206ef2619916405b0b7a9ff361] | committer: hpi1 

Split bd_read() at clip boundary.
Data from two clips won't be mixed.

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

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

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index db5c3e3..9a10b29 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -1017,6 +1017,12 @@ int bd_read(BLURAY *bd, unsigned char *buf, int len)
                     return 0;
                 }
                 if (clip_pkt >= st->clip->end_pkt) {
+
+                    // split read()'s at clip boundary
+                    if (out_len) {
+                        return out_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);



More information about the libbluray-devel mailing list