mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 18:10:13 +01:00
Reduce MAKE_ACCESSORS code duplication via a new header.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "libavcodec/internal.h"
|
||||
#include "libavcodec/raw.h"
|
||||
#include "libavcodec/bytestream.h"
|
||||
#include "libavutil/accessors.h"
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavutil/dict.h"
|
||||
@@ -98,10 +99,6 @@ static int64_t wrap_timestamp(AVStream *st, int64_t timestamp)
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
#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(AVStream, stream, AVRational, r_frame_rate)
|
||||
|
||||
/* an arbitrarily chosen "sane" max packet size -- 50M */
|
||||
|
||||
Reference in New Issue
Block a user