Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > ebea501d04bf180b781d727bbbb57b40 > files > 5

swftools-0.9.2-16.mga9.src.rpm

--- swftools-0.9.2/src/gif2swf.c.orig	2016-01-07 17:14:58.017101449 -0500
+++ swftools-0.9.2/src/gif2swf.c	2016-01-07 17:19:53.158462817 -0500
@@ -230,17 +230,13 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, c
     }
     fclose(fi);
 
-    if ((gft = DGifOpenFileName(sname)) == NULL) {
+    if ((gft = DGifOpenFileName(sname, NULL)) == NULL) {
         fprintf(stderr, "%s is not a GIF file!\n", sname);
         return t;
     }
 
     if (DGifSlurp(gft) != GIF_OK) {
-        char *Err = GifErrorString();
-        if (Err != NULL) 
-            fprintf(stderr, "\nGIF-LIB error: %s.\n", Err);
-        else
-            fprintf(stderr, "\nGIF-LIB undefined error %d.\n", GifError());
+        fprintf(stderr, "\nGIF-LIB error.\n");
         return t;
     }
 
@@ -459,7 +455,7 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, c
 
     free(pal);
     free(imagedata);
-    DGifCloseFile(gft);
+    DGifCloseFile(gft, NULL);
 
     return t;
 }
@@ -492,7 +488,7 @@ int CheckInputFile(char *fname, char **r
     }
     fclose(fi);
 
-    if ((gft = DGifOpenFileName(s)) == NULL) {
+    if ((gft = DGifOpenFileName(s, NULL)) == NULL) {
         fprintf(stderr, "%s is not a GIF file!\n", fname);
         return -1;
     }
@@ -503,11 +499,7 @@ int CheckInputFile(char *fname, char **r
         global.max_image_height = gft->SHeight;
 
     if (DGifSlurp(gft) != GIF_OK) { 
-        char *Err = GifErrorString();
-        if (Err != NULL) 
-            fprintf(stderr, "\nGIF-LIB error: %s.\n", Err);
-        else
-            fprintf(stderr, "\nGIF-LIB undefined error %d.\n", GifError());
+        fprintf(stderr, "\nGIF-LIB error.\n");
         return -1;
     }
     // After DGifSlurp() call, gft->ImageCount become available
@@ -526,7 +518,7 @@ int CheckInputFile(char *fname, char **r
             fprintf(stderr, "frame: %u, delay: %.3f sec\n", i + 1, getGifDelayTime(gft, i) / 100.0);
     }
 
-    DGifCloseFile(gft);
+    DGifCloseFile(gft, NULL);
 
     return 0;
 }