[gegl] jp2-load: Fix warning



commit 73a429b37de25ee8f30510dc9247224e05c28a54
Author: Jon Nordby <jononor gmail com>
Date:   Tue Apr 24 12:55:09 2018 +0200

    jp2-load: Fix warning
    
    Documentation says buf==0 and bufsize==0 should be used
    when buffer should be grown automatically. In version
    2.0.14+ using a negative number writes to stderr a warning like:
    YOUR CODE IS RELYING ON DEPRECATED FUNCTIONALTIY IN THE JASPER LIBRARY
    
    Ref https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735

 operations/external/jp2-load.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/operations/external/jp2-load.c b/operations/external/jp2-load.c
index 44ee336..80cd1c8 100644
--- a/operations/external/jp2-load.c
+++ b/operations/external/jp2-load.c
@@ -251,7 +251,7 @@ prepare (GeglOperation *operation)
 
   if (p->image == NULL)
     {
-      jasper = jas_stream_memopen(NULL, -1);
+      jasper = jas_stream_memopen(NULL, 0);
       if (jasper == NULL)
         {
           g_warning("%s", _("could not create a new Jasper stream"));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]