[libbluray-devel] cosmetics

hpi1 git at videolan.org
Sat Nov 9 09:35:57 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Nov  9 10:30:45 2013 +0200| [edb43dbcceeaa7d18087e683b0d21f44cda55d6c] | committer: hpi1

cosmetics

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

 src/libbluray/bdj/native/org_videolan_Libbluray.c |   24 +++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/libbluray/bdj/native/org_videolan_Libbluray.c b/src/libbluray/bdj/native/org_videolan_Libbluray.c
index cfd68cd..8757671 100644
--- a/src/libbluray/bdj/native/org_videolan_Libbluray.c
+++ b/src/libbluray/bdj/native/org_videolan_Libbluray.c
@@ -412,6 +412,9 @@ JNIEXPORT void JNICALL Java_org_videolan_Libbluray_updateGraphicN(JNIEnv * env,
     }
 
     if (bdj->buf && bdj->buf->buf[BD_OVERLAY_IG]) {
+
+        /* copy to application-allocated buffer */
+
         jint y, *dst;
         jsize offset;
 
@@ -421,13 +424,12 @@ JNIEXPORT void JNICALL Java_org_videolan_Libbluray_updateGraphicN(JNIEnv * env,
         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) {
             bdj->buf->lock(bdj->buf);
         }
 
         /* check buffer size */
+
         if (bdj->buf->width < width || bdj->buf->height < height) {
             /* assume buffer is only for the dirty arrea */
             BD_DEBUG(DBG_BDJ, "ARGB frame buffer size is smaller than BD-J frame buffer size (app: %dx%d BD-J: %dx%d)\n",
@@ -447,15 +449,15 @@ JNIEXPORT void JNICALL Java_org_videolan_Libbluray_updateGraphicN(JNIEnv * env,
 
             dst = (jint*)bdj->buf->buf[BD_OVERLAY_IG] + y0 * bdj->buf->width + x0;
 
-        /* clip */
-        if (y1 >= bdj->buf->height) {
-            BD_DEBUG(DBG_BDJ | DBG_CRIT, "Cropping %d rows from bottom\n", y1 - bdj->buf->height);
-            y1 = bdj->buf->height - 1;
-        }
-        if (x1 >= bdj->buf->width) {
-            BD_DEBUG(DBG_BDJ | DBG_CRIT, "Cropping %d pixels from right\n", x1 - bdj->buf->width);
-            x1 = bdj->buf->width - 1;
-        }
+            /* clip */
+            if (y1 >= bdj->buf->height) {
+                BD_DEBUG(DBG_BDJ | DBG_CRIT, "Cropping %d rows from bottom\n", y1 - bdj->buf->height);
+                y1 = bdj->buf->height - 1;
+            }
+            if (x1 >= bdj->buf->width) {
+                BD_DEBUG(DBG_BDJ | DBG_CRIT, "Cropping %d pixels from right\n", x1 - bdj->buf->width);
+                x1 = bdj->buf->width - 1;
+            }
         }
 
         /* copy */



More information about the libbluray-devel mailing list