From a83aea49479818a1e5037d11a3e7f7d1f019c939 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 14 Jun 2013 17:51:45 +0200 Subject: Fix Bug 745: NPE - QTT definition shall be allowd to _follow_ SOF (frame) - Reference QTT via QTT[] passed to frame, validate after parsing. --- .../util/texture/TestJPEGTextureFromFileNEWT.java | 21 +++++++++++++++++++-- .../jogl/util/texture/bug745_qttdef_post_frame.jpg | Bin 0 -> 8415 bytes 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/util/texture/bug745_qttdef_post_frame.jpg (limited to 'src/test/com/jogamp') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestJPEGTextureFromFileNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestJPEGTextureFromFileNEWT.java index 55e8152ae..82867f9e6 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestJPEGTextureFromFileNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestJPEGTextureFromFileNEWT.java @@ -74,6 +74,8 @@ public class TestJPEGTextureFromFileNEWT extends UITestCase { InputStream testTextureStream03CMYK_01; InputStream testTextureStream03YCCK_01; + InputStream testTextureStream04QTTDefPostFrame; + @Before public void initTest() throws IOException { { @@ -132,6 +134,13 @@ public class TestJPEGTextureFromFileNEWT extends UITestCase { testTextureStream03YCCK_01 = testTextureUrlConn.getInputStream(); Assert.assertNotNull(testTextureStream03YCCK_01); } + { + URLConnection testTextureUrlConn = IOUtil.getResource(this.getClass(), "bug745_qttdef_post_frame.jpg"); + Assert.assertNotNull(testTextureUrlConn); + testTextureStream04QTTDefPostFrame = testTextureUrlConn.getInputStream(); + Assert.assertNotNull(testTextureStream04QTTDefPostFrame); + } + } @After @@ -142,7 +151,10 @@ public class TestJPEGTextureFromFileNEWT extends UITestCase { testTextureStream01YUV422h_Prog = null; testTextureStream02YUV420_Base = null; testTextureStream02YUV420_Prog = null; - testTextureStream02YUV420_BaseGray = null; + testTextureStream02YUV420_BaseGray = null; + testTextureStream03CMYK_01 = null; + testTextureStream03YCCK_01 = null; + testTextureStream04QTTDefPostFrame = null; } public void testImpl(boolean useFFP, final InputStream istream) throws InterruptedException, IOException { @@ -241,7 +253,7 @@ public class TestJPEGTextureFromFileNEWT extends UITestCase { @Test public void test02YUV420BaseGray_ES2() throws InterruptedException, IOException { testImpl(false, testTextureStream02YUV420_BaseGray); - } + } @Test public void test03CMYK_01_ES2() throws InterruptedException, IOException { @@ -251,6 +263,11 @@ public class TestJPEGTextureFromFileNEWT extends UITestCase { public void test03YCCK_01_ES2() throws InterruptedException, IOException { testImpl(false, testTextureStream03YCCK_01); } + + @Test + public void test04QTTDefPostFrame_ES2() throws InterruptedException, IOException { + testImpl(false, testTextureStream04QTTDefPostFrame); + } public static void main(String args[]) throws IOException { for(int i=0; i