[libbluray-devel] Set BD-J frame buffer dirty area before locking the buffer

hpi1 git at videolan.org
Fri Nov 8 12:24:58 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Nov  8 13:21:01 2013 +0200| [3ed0fb706cd8bfbd80c4481207106801947abe6b] | committer: hpi1

Set BD-J frame buffer dirty area before locking the buffer

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

 src/libbluray/bdj/native/org_videolan_Libbluray.c |    6 ++++++
 src/libbluray/decoders/overlay.h                  |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/native/org_videolan_Libbluray.c b/src/libbluray/bdj/native/org_videolan_Libbluray.c
index e352ba3..a69f31c 100644
--- a/src/libbluray/bdj/native/org_videolan_Libbluray.c
+++ b/src/libbluray/bdj/native/org_videolan_Libbluray.c
@@ -415,6 +415,12 @@ JNIEXPORT void JNICALL Java_org_videolan_Libbluray_updateGraphicN(JNIEnv * env,
         jint y, *dst;
         jsize offset;
 
+        /* set dirty area before lock() */
+        bdj->buf->dirty[BD_OVERLAY_IG].x0 = x0;
+        bdj->buf->dirty[BD_OVERLAY_IG].x1 = x1;
+        bdj->buf->dirty[BD_OVERLAY_IG].y0 = y0;
+        bdj->buf->dirty[BD_OVERLAY_IG].y1 = y1;
+
         /* copy to application-allocated buffer */
 
         if (bdj->buf->lock) {
diff --git a/src/libbluray/decoders/overlay.h b/src/libbluray/decoders/overlay.h
index aca16ce..757becd 100644
--- a/src/libbluray/decoders/overlay.h
+++ b/src/libbluray/decoders/overlay.h
@@ -188,7 +188,7 @@ typedef struct bd_argb_buffer_s {
     int height;
 
     /* dirty area of buffers
-     * - Updated by library.
+     * - Updated by library before lock() call.
      * - Reset after each BD_ARGB_OVERLAY_FLUSH.
      */
     struct {



More information about the libbluray-devel mailing list