Change embedded artwork libav preprocessor conditions

This commit is contained in:
ejurgensen 2014-01-11 23:37:04 +01:00
parent 2d4de9dd75
commit 60f43c94c9
2 changed files with 4 additions and 4 deletions

View File

@ -667,7 +667,7 @@ artwork_get(char *filename, int max_w, int max_h, int format, struct evbuffer *e
return ret; return ret;
} }
#if LIBAVFORMAT_VERSION_MAJOR >= 55 || (LIBAVFORMAT_VERSION_MAJOR == 54 && LIBAVFORMAT_VERSION_MINOR >= 20) #if LIBAVFORMAT_VERSION_MAJOR >= 55 || (LIBAVFORMAT_VERSION_MAJOR == 54 && LIBAVFORMAT_VERSION_MINOR >= 6)
static int static int
artwork_get_embedded_image(char *filename, int max_w, int max_h, int format, struct evbuffer *evbuf) artwork_get_embedded_image(char *filename, int max_w, int max_h, int format, struct evbuffer *evbuf)
{ {
@ -973,7 +973,7 @@ artwork_get_item_filename(char *filename, int max_w, int max_h, int format, stru
{ {
int ret; int ret;
#if LIBAVFORMAT_VERSION_MAJOR >= 55 || (LIBAVFORMAT_VERSION_MAJOR == 54 && LIBAVFORMAT_VERSION_MINOR >= 20) #if LIBAVFORMAT_VERSION_MAJOR >= 55 || (LIBAVFORMAT_VERSION_MAJOR == 54 && LIBAVFORMAT_VERSION_MINOR >= 6)
/* Look for embedded artwork */ /* Look for embedded artwork */
ret = artwork_get_embedded_image(filename, max_w, max_h, format, evbuf); ret = artwork_get_embedded_image(filename, max_w, max_h, format, evbuf);
if (ret > 0) if (ret > 0)
@ -1079,7 +1079,7 @@ artwork_get_group(int id, int max_w, int max_h, int format, struct evbuffer *evb
got_art = 0; got_art = 0;
while (!got_art && ((ret = db_query_fetch_file(&qp, &dbmfi)) == 0) && (dbmfi.id)) while (!got_art && ((ret = db_query_fetch_file(&qp, &dbmfi)) == 0) && (dbmfi.id))
{ {
#if LIBAVFORMAT_VERSION_MAJOR >= 55 || (LIBAVFORMAT_VERSION_MAJOR == 54 && LIBAVFORMAT_VERSION_MINOR >= 20) #if LIBAVFORMAT_VERSION_MAJOR >= 55 || (LIBAVFORMAT_VERSION_MAJOR == 54 && LIBAVFORMAT_VERSION_MINOR >= 6)
if ((safe_atoi32(dbmfi.artwork, &artwork_t) == 0) && (artwork_t == ARTWORK_EMBEDDED)) if ((safe_atoi32(dbmfi.artwork, &artwork_t) == 0) && (artwork_t == ARTWORK_EMBEDDED))
got_art = (artwork_get_embedded_image(dbmfi.path, max_w, max_h, format, evbuf) > 0); got_art = (artwork_get_embedded_image(dbmfi.path, max_w, max_h, format, evbuf) > 0);
else else

View File

@ -385,7 +385,7 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
#else #else
case CODEC_TYPE_VIDEO: case CODEC_TYPE_VIDEO:
#endif #endif
#if LIBAVFORMAT_VERSION_MAJOR >= 55 || (LIBAVFORMAT_VERSION_MAJOR == 54 && LIBAVFORMAT_VERSION_MINOR >= 20) #if LIBAVFORMAT_VERSION_MAJOR >= 55 || (LIBAVFORMAT_VERSION_MAJOR == 54 && LIBAVFORMAT_VERSION_MINOR >= 6)
if (ctx->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC) if (ctx->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC)
{ {
DPRINTF(E_DBG, L_SCAN, "Found embedded artwork (stream %d)\n", i); DPRINTF(E_DBG, L_SCAN, "Found embedded artwork (stream %d)\n", i);