libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit 79585dea037e35066eb58c3a13b42c5b39d966df
parent 4d061ce2f83a899fbf149db1e8006a535368d081
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 16 Aug 2012 22:09:31 +0000

bugfixes, disable debug output

Diffstat:
Msrc/plugins/thumbnailffmpeg_extractor.c | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/plugins/thumbnailffmpeg_extractor.c b/src/plugins/thumbnailffmpeg_extractor.c @@ -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 @@ extract_video (struct EXTRACTOR_ExtractContext *ec) 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 @@ extract_video (struct EXTRACTOR_ExtractContext *ec) if (NULL != codec) avcodec_close (codec_ctx); avformat_close_input (&format_ctx); + av_free (io_ctx); return; } @@ -528,6 +528,7 @@ extract_video (struct EXTRACTOR_ExtractContext *ec) #endif avcodec_close (codec_ctx); avformat_close_input (&format_ctx); + av_free (io_ctx); return; } #if DEBUG @@ -573,6 +574,7 @@ extract_video (struct EXTRACTOR_ExtractContext *ec) 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 @@ extract_video (struct EXTRACTOR_ExtractContext *ec) av_free (frame); avcodec_close (codec_ctx); avformat_close_input (&format_ctx); + av_free (io_ctx); }