Lewis Z
Lewis Z

Reputation: 494

where is the source code for av_codec_set_pkt_timebase in ffmpeg repo

I am using libavformat to mux AVI files.

When I look into the ffmpeg source code, I cannot find the function definition for av_codec_set_pkt_timebase while I can only find the function declaration in avcodec.h

I am using git revision: bfdf0f078a7463e1f304ef6fea3b25518cc45c3b

Who can tell where is the function definition for av_codec_set_pkt_timebase?

Best regards, Lewis

Upvotes: 0

Views: 900

Answers (1)

TachyonVortex
TachyonVortex

Reputation: 8602

In revision bfdf0f0, av_codec_set_pkt_timebase is created in libavcodec/utils.c on line 1264:

MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)

MAKE_ACCESSORS is a macro defined in libavutil/internal.h:

#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; }

Upvotes: 2

Related Questions