Ticket #1750: ffmpeg_fix.diff
File ffmpeg_fix.diff, 1.4 KB (added by ismangil, 10 years ago) |
---|
-
pjmedia/src/pjmedia/ffmpeg_util.c
26 26 #include "ffmpeg_util.h" 27 27 #include <libavformat/avformat.h> 28 28 29 #define MAKE_VER(mj,mn,mi) ((mj << 16) | (mn << 8) | (mi << 0))30 #define VER_AT_LEAST(mj,mn,mi) (MAKE_VER(LIBAVUTIL_VERSION_MAJOR, \31 LIBAVUTIL_VERSION_MINOR, \32 LIBAVUTIL_VERSION_MICRO) >= \33 MAKE_VER(mj,mn,mi))34 35 36 29 37 30 /* Conversion table between pjmedia_format_id and PixelFormat */ 38 31 static const struct ffmpeg_fmt_table_t … … 44 37 { PJMEDIA_FORMAT_RGBA, PIX_FMT_RGBA}, 45 38 { PJMEDIA_FORMAT_RGB24,PIX_FMT_BGR24}, 46 39 { PJMEDIA_FORMAT_BGRA, PIX_FMT_BGRA}, 47 #if VER_AT_LEAST(51,20,1)40 #if LIBAVUTIL_BUILD >= PJ_CALC_FFMPEG_VERSION(51,20,1) 48 41 { PJMEDIA_FORMAT_GBRP, PIX_FMT_GBR24P}, 49 42 #endif 50 43 -
pjmedia/src/pjmedia/ffmpeg_util.h
37 37 #include <libavutil/avutil.h> 38 38 #include <libavcodec/avcodec.h> 39 39 40 #define PJ_CALC_FFMPEG_VERSION(mj,mn,mi) ((mj << 16) | (mn << 8) | (mi << 0)) 41 42 #if LIBAVCODEC_BUILD >= PJ_CALC_FFMPEG_VERSION(54,25,0) 43 #define CodecID AVCodecID 44 #endif 45 40 46 void pjmedia_ffmpeg_add_ref(); 41 47 void pjmedia_ffmpeg_dec_ref(); 42 48