Added support for libav/ffmpeg dual installs (#346)

* [config] Added support for libav/ffmpeg dual installs

Reordered CPPFLAGS/LIBS so that library flags (includes etc) appear
ahead of prefix/global directives and the correct headers/libraries
are checked (if symbols are defined in alternative libraries).
Updated libav checks to use header declaration checks
rather than link checks (so differences between
libav/ffmpeg can be correctly found), and updated code references
to use new defines.  Added support the alternate pkg-config
package names for libav.  Updated ffmpeg vs libav check
to check MICRO version number (>=100 for ffmpeg).  Simplified
resulting configure script by using a function to merge
CPPFLAGS variables.

* [config] Use FORKED_OPTS prefix for libevent_pthreads option

* [config] Add --with-libav option to select libav even if ffmpeg present
This commit is contained in:
sshambar
2017-02-19 06:21:00 -08:00
committed by ejurgensen
parent ff49e176f2
commit c54c909ae4
6 changed files with 130 additions and 81 deletions

View File

@@ -508,7 +508,7 @@ artwork_rescale(struct evbuffer *evbuf, AVFormatContext *src_ctx, int s, int out
goto out_free_frames;
}
#ifdef HAVE_AV_IMAGE_FILL_ARRAYS
#if HAVE_DECL_AV_IMAGE_FILL_ARRAYS
av_image_fill_arrays(o_frame->data, o_frame->linesize, buf, dst->pix_fmt, src->width, src->height, 1);
#else
avpicture_fill((AVPicture *)o_frame, buf, dst->pix_fmt, src->width, src->height);