Browse Source

Make OFFSET() reuse offsetof

Originally committed as revision 6251 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Panagiotis Issaris 19 years ago
parent
commit
66acccf05f
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      libavcodec/utils.c
  2. +1
    -1
      libavformat/utils.c

+ 1
- 1
libavcodec/utils.c View File

@@ -438,7 +438,7 @@ static const char* context_to_name(void* ptr) {
return "NULL";
}

#define OFFSET(x) (int)&((AVCodecContext*)0)->x
#define OFFSET(x) offsetof(AVCodecContext,x)
#define DEFAULT 0 //should be NAN but it doesnt work as its not a constant in glibc as required by ANSI/ISO C
//these names are too long to be readable
#define V AV_OPT_FLAG_VIDEO_PARAM


+ 1
- 1
libavformat/utils.c View File

@@ -458,7 +458,7 @@ static const char* format_to_name(void* ptr)
else return "NULL";
}

#define OFFSET(x) (int)&((AVFormatContext*)0)->x
#define OFFSET(x) offsetof(AVFormatContext,x)
#define DEFAULT 0 //should be NAN but it doesnt work as its not a constant in glibc as required by ANSI/ISO C
//these names are too long to be readable
#define E AV_OPT_FLAG_ENCODING_PARAM


Loading…
Cancel
Save