gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r23267 - Extractor/src/plugins


From: gnunet
Subject: [GNUnet-SVN] r23267 - Extractor/src/plugins
Date: Fri, 17 Aug 2012 00:09:31 +0200

Author: grothoff
Date: 2012-08-17 00:09:31 +0200 (Fri, 17 Aug 2012)
New Revision: 23267

Modified:
   Extractor/src/plugins/thumbnailffmpeg_extractor.c
Log:
bugfixes, disable debug output

Modified: Extractor/src/plugins/thumbnailffmpeg_extractor.c
===================================================================
--- Extractor/src/plugins/thumbnailffmpeg_extractor.c   2012-08-16 22:04:44 UTC 
(rev 23266)
+++ Extractor/src/plugins/thumbnailffmpeg_extractor.c   2012-08-16 22:09:31 UTC 
(rev 23267)
@@ -62,7 +62,7 @@
 /**
  * Set to 1 to enable debug output.
  */ 
-#define DEBUG 1
+#define DEBUG 0
 
 /**
  * max dimension in pixels for the thumbnail.
@@ -474,18 +474,17 @@
   if (0 != avformat_open_input (&format_ctx, "<no file>", NULL, &options))
     return;
   av_dict_free (&options);  
-  options = NULL;
-  if (0 > avformat_find_stream_info (format_ctx, &options))
+  if (0 > avformat_find_stream_info (format_ctx, NULL))
     {
  #if DEBUG
       fprintf (stderr,
                "Failed to read stream info\n");
 #endif
       avformat_close_input (&format_ctx);
+      av_free (io_ctx);
+      av_free (iob);
       return;
     }
-  av_dict_free (&options);  
-
   codec = NULL;
   codec_ctx = NULL;
   video_stream_index = -1;
@@ -517,6 +516,7 @@
       if (NULL != codec)
         avcodec_close (codec_ctx);
       avformat_close_input (&format_ctx);
+      av_free (io_ctx);
       return;
     }
 
@@ -528,6 +528,7 @@
 #endif
       avcodec_close (codec_ctx);
       avformat_close_input (&format_ctx);
+      av_free (io_ctx);
       return;
     }
 #if DEBUG
@@ -573,6 +574,7 @@
       av_free (frame);
       avcodec_close (codec_ctx);
       avformat_close_input (&format_ctx);
+      av_free (io_ctx);
       return;
     }
   calculate_thumbnail_dimensions (codec_ctx->width, codec_ctx->height,
@@ -598,6 +600,7 @@
   av_free (frame);
   avcodec_close (codec_ctx);
   avformat_close_input (&format_ctx);
+  av_free (io_ctx);
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]