commit ab08aff3bb8e0b7cdc172395e192c684c65a4ae3
parent 2a8468ea9d446aa64058250170063b08d33d0d75
Author: Heikki Lindholm <holin@iki.fi>
Date: Fri, 25 Dec 2009 07:14:55 +0000
catch ffmpegs logging
Diffstat:
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/plugins/thumbnailffmpeg_extractor.c b/src/plugins/thumbnailffmpeg_extractor.c
@@ -44,27 +44,25 @@
#define DEBUG 0
+static void thumbnailffmpeg_av_log_callback(void* ptr,
+ int level,
+ const char *format,
+ va_list ap)
+{
+#if DEBUG
+ vfprintf(stderr, format, ap);
+#endif
+}
+
void __attribute__ ((constructor)) ffmpeg_lib_init (void)
{
+ av_log_set_callback (thumbnailffmpeg_av_log_callback);
av_register_all ();
}
#define THUMBSIZE 128 /* max dimension in pixels */
#define MAX_THUMB_SIZE (100*1024) /* in bytes */
-
-const char *
-EXTRACTOR_thumbnailffmpeg_options ()
-{
- return "close-stderr";
-}
-
-const char *
-EXTRACTOR_thumbnail_options ()
-{
- return "close-stderr";
-}
-
/*
* Rescale and encode a png thumbnail
* on success, fills in output_data and returns the number of bytes used