mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-20 07:35:25 +08: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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user