[libbluray-devel] Check for null
hpi1
git at videolan.org
Wed May 3 15:10:32 CEST 2017
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Apr 3 15:47:58 2017 +0300| [feb1b6ac3b42bed832546e297c535b4791458215] | committer: hpi1
Check for null
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=feb1b6ac3b42bed832546e297c535b4791458215
---
.../java/org/videolan/media/content/playlist/VideoControl.java | 5 ++++-
.../media/content/video/dvb/mpeg/drip/VideoControl.java | 10 ++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/libbluray/bdj/java/org/videolan/media/content/playlist/VideoControl.java b/src/libbluray/bdj/java/org/videolan/media/content/playlist/VideoControl.java
index c556d2c7..32185ec6 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/playlist/VideoControl.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/playlist/VideoControl.java
@@ -118,7 +118,10 @@ public abstract class VideoControl extends StreamControl implements VideoPresent
Dimension vd = getInputVideoSize();
if ((vd.width == 0) || (vd.height == 0))
return new Rectangle(0, 0);
- srcArea = getRectangleOnScreen(getNormalizedRectangle(vd, clipRect));
+ if (clipRect != null)
+ srcArea = getRectangleOnScreen(getNormalizedRectangle(vd, clipRect));
+ else
+ srcArea = new HScreenRectangle(0.0f, 0.0f, 1.0f, 1.0f);
//TODO
org.videolan.Logger.unimplemented("VideoControl", "setClipRegion");
diff --git a/src/libbluray/bdj/java/org/videolan/media/content/video/dvb/mpeg/drip/VideoControl.java b/src/libbluray/bdj/java/org/videolan/media/content/video/dvb/mpeg/drip/VideoControl.java
index c6e3b97f..1d802273 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/video/dvb/mpeg/drip/VideoControl.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/video/dvb/mpeg/drip/VideoControl.java
@@ -114,9 +114,15 @@ public class VideoControl implements VideoPresentationControl {
Dimension vd = getInputVideoSize();
if ((vd.width == 0) || (vd.height == 0))
return new Rectangle(0, 0);
- srcArea = getRectangleOnScreen(getNormalizedRectangle(vd, clipRect));
+ if (clipRect != null)
+ srcArea = getRectangleOnScreen(getNormalizedRectangle(vd, clipRect));
+ else
+ srcArea = new HScreenRectangle(0.0f, 0.0f, 1.0f, 1.0f);
+
//TODO
- return getRectangle(vd, srcArea);
+ org.videolan.Logger.unimplemented("VideoControl", "setClipRegion");
+
+ return getRectangle(vd, srcArea);
}
public float[] supportsArbitraryHorizontalScaling() {
More information about the libbluray-devel
mailing list