Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /metadata.c [89c70b] .. [fdcdd9] Maximize Restore

  Switch to side-by-side view

--- a/metadata.c
+++ b/metadata.c
@@ -29,54 +29,13 @@
 #include <fcntl.h>
 
 #include <libexif/exif-loader.h>
-#include "image_utils.h"
-#include "tagutils/tagutils.h"
 #include <jpeglib.h>
 #include <setjmp.h>
-
-#if HAVE_FFMPEG_LIBAVUTIL_AVUTIL_H
-#include <ffmpeg/libavutil/avutil.h>
-#elif HAVE_LIBAV_LIBAVUTIL_AVUTIL_H
-#include <libav/libavutil/avutil.h>
-#elif HAVE_LIBAVUTIL_AVUTIL_H
-#include <libavutil/avutil.h>
-#elif HAVE_FFMPEG_AVUTIL_H
-#include <ffmpeg/avutil.h>
-#elif HAVE_LIBAV_AVUTIL_H
-#include <libav/avutil.h>
-#elif HAVE_AVUTIL_H
-#include <avutil.h>
-#endif
-
-#if HAVE_FFMPEG_LIBAVCODEC_AVCODEC_H
-#include <ffmpeg/libavcodec/avcodec.h>
-#elif HAVE_LIBAV_LIBAVCODEC_AVCODEC_H
-#include <libav/libavcodec/avcodec.h>
-#elif HAVE_LIBAVCODEC_AVCODEC_H
-#include <libavcodec/avcodec.h>
-#elif HAVE_FFMPEG_AVCODEC_H
-#include <ffmpeg/avcodec.h>
-#elif HAVE_LIBAV_AVCODEC_H
-#include <libav/avcodec.h>
-#elif HAVE_AVCODEC_H
-#include <avcodec.h>
-#endif
-
-#if HAVE_FFMPEG_LIBAVFORMAT_AVFORMAT_H
-#include <ffmpeg/libavformat/avformat.h>
-#elif HAVE_LIBAV_LIBAVFORMAT_AVFORMAT_H
-#include <libav/libavformat/avformat.h>
-#elif HAVE_LIBAVFORMAT_AVFORMAT_H
-#include <libavformat/avformat.h>
-#elif HAVE_FFMPEG_AVFORMAT_H
-#include <ffmpeg/avformat.h>
-#elif HAVE_LIBAV_LIBAVFORMAT_H
-#include <libav/avformat.h>
-#elif HAVE_AVFORMAT_H
-#include <avformat.h>
-#endif
+#include "libav.h"
 
 #include "upnpglobalvars.h"
+#include "tagutils/tagutils.h"
+#include "image_utils.h"
 #include "upnpreplyparse.h"
 #include "tivo_utils.h"
 #include "metadata.h"
@@ -140,7 +99,7 @@
 #if LIBAVFORMAT_VERSION_INT >= ((53<<16)+(17<<8)+0)
 	ret = avformat_open_input(ctx, filename, NULL, NULL);
 	if (ret == 0)
-        	avformat_find_stream_info(*ctx, NULL);
+		avformat_find_stream_info(*ctx, NULL);
 #else
 	ret = av_open_input_file(ctx, filename, NULL, 0, NULL);
 	if (ret == 0)
@@ -764,7 +723,9 @@
 	ret = lav_open(&ctx, path);
 	if( ret != 0 )
 	{
-		DPRINTF(E_WARN, L_METADATA, "Opening %s failed!\n", path);
+		char err[128];
+		av_strerror(ret, err, sizeof(err));
+		DPRINTF(E_WARN, L_METADATA, "Opening %s failed! [%s]\n", path, err);
 		return 0;
 	}
 	//dump_format(ctx, 0, NULL, 0);