Changeset 3839 for pjproject/trunk


Ignore:
Timestamp:
Oct 24, 2011 6:50:34 AM (13 years ago)
Author:
bennylp
Message:

Misc (re #1393): fixed wrong libavutil version detection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/ffmpeg_util.c

    r3823 r3839  
    2525#include <libavformat/avformat.h> 
    2626 
     27#define MAKE_VER(mj,mn,mi)      ((mj << 16) | (mn << 8) | (mi << 0)) 
     28#define VER_AT_LEAST(mj,mn,mi)  (MAKE_VER(LIBAVUTIL_VERSION_MAJOR, \ 
     29                                          LIBAVUTIL_VERSION_MINOR, \ 
     30                                          LIBAVUTIL_VERSION_MICRO) >= \ 
     31                                 MAKE_VER(mj,mn,mi)) 
     32 
     33 
     34 
    2735/* Conversion table between pjmedia_format_id and PixelFormat */ 
    2836static const struct ffmpeg_fmt_table_t 
     
    3543    { PJMEDIA_FORMAT_RGB24,PIX_FMT_BGR24}, 
    3644    { PJMEDIA_FORMAT_BGRA, PIX_FMT_BGRA}, 
    37 #if (LIBAVUTIL_VERSION_MAJOR >= 51) && (LIBAVUTIL_VERSION_MINOR >= 20) && \ 
    38     (LIBAVUTIL_VERSION_MICRO >= 1) 
     45#if VER_AT_LEAST(51,20,1) 
    3946    { PJMEDIA_FORMAT_GBRP, PIX_FMT_GBR24P}, 
    4047#endif 
Note: See TracChangeset for help on using the changeset viewer.