aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-08-08 20:02:46 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-08-08 20:32:40 +0200
commita48979d7155934153d0647e18c63c8993b18b026 (patch)
tree57ee452d6d7482921085250c4c1ac9e6924a601a /libavcodec/utils.c
parent55a88daf6ff1e09994bff39fac313a38a35b0055 (diff)
downloadffmpeg-a48979d7155934153d0647e18c63c8993b18b026.tar.gz
Reduce MAKE_ACCESSORS code duplication via a new header.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index fd08becc75..063105a3f3 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -26,6 +26,7 @@
*/
#include "config.h"
+#include "libavutil/accessors.h"
#include "libavutil/atomic.h"
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
@@ -1029,10 +1030,6 @@ void avcodec_free_frame(AVFrame **frame)
av_freep(frame);
}
-#define MAKE_ACCESSORS(str, name, type, field) \
- type av_##name##_get_##field(const str *s) { return s->field; } \
- void av_##name##_set_##field(str *s, type v) { s->field = v; }
-
MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)
MAKE_ACCESSORS(AVCodecContext, codec, int, lowres)