Project

General

Profile

Actions

Bug #872

closed

AVMEDIA_TYPE_* defines don't work this way

Added by etobi almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/04/2012
Due date:
% Done:

0%

Estimated time:

Description

Doing something like #ifndef AVMEDIA_TYPE_AUDIO does not work. The preprocessor can not check if an enum value is defined (at least not with gcc >= 4.4.5).

I suggest doing something like:

#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(50, 14, 0)
  #define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO
  #define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO
  #define AVMEDIA_TYPE_UNKNOWN CODEC_TYPE_UNKNOWN
#endif

(Haven't tested this with older ffmpegs yet.)


Files

Actions

Also available in: Atom PDF