mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-09 05:34:58 -05:00
Add preprocessor macro FFMPEG_INCOMPATIBLE_API and use it, so
we use avcodec_find_best_pix_fmt_of_list for ffmpeg. Also rearrange ffmpeg/libav libraries according to ffmpeg FAQ.
This commit is contained in:
@@ -293,7 +293,11 @@ artwork_rescale(AVFormatContext *src_ctx, int s, int out_w, int out_h, int forma
|
||||
#endif
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 55 || (LIBAVCODEC_VERSION_MAJOR == 54 && LIBAVCODEC_VERSION_MINOR >= 35)
|
||||
# ifndef FFMPEG_INCOMPATIBLE_API
|
||||
dst->pix_fmt = avcodec_find_best_pix_fmt2((enum AVPixelFormat *)img_encoder->pix_fmts, src->pix_fmt, 1, NULL);
|
||||
# else
|
||||
dst->pix_fmt = avcodec_find_best_pix_fmt_of_list((enum AVPixelFormat *)img_encoder->pix_fmts, src->pix_fmt, 1, NULL);
|
||||
# endif
|
||||
#else
|
||||
const enum PixelFormat *pix_fmts;
|
||||
int64_t pix_fmt_mask = 0;
|
||||
|
||||
Reference in New Issue
Block a user