diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-10-19 21:07:43 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-11-02 10:11:48 +0100 |
commit | c00a11ab383ff276a2ab2fdba577945e48d465be (patch) | |
tree | bd8b81af588eca01f21496e5cdaa8e7ccab0614e /doc/examples/encode_audio.c | |
parent | 40aaa8dadfd1c69ff4460d04750e1403b5535a6d (diff) | |
download | ffmpeg-c00a11ab383ff276a2ab2fdba577945e48d465be.tar.gz |
examples/encode_audio: constify AVCodec instances
Diffstat (limited to 'doc/examples/encode_audio.c')
-rw-r--r-- | doc/examples/encode_audio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/examples/encode_audio.c b/doc/examples/encode_audio.c index cabe5893b0..a8e0cd04e7 100644 --- a/doc/examples/encode_audio.c +++ b/doc/examples/encode_audio.c @@ -37,7 +37,7 @@ #include "libavutil/samplefmt.h" /* check that a given sample format is supported by the encoder */ -static int check_sample_fmt(AVCodec *codec, enum AVSampleFormat sample_fmt) +static int check_sample_fmt(const AVCodec *codec, enum AVSampleFormat sample_fmt) { const enum AVSampleFormat *p = codec->sample_fmts; @@ -50,7 +50,7 @@ static int check_sample_fmt(AVCodec *codec, enum AVSampleFormat sample_fmt) } /* just pick the highest supported samplerate */ -static int select_sample_rate(AVCodec *codec) +static int select_sample_rate(const AVCodec *codec) { const int *p; int best_samplerate = 0; @@ -67,7 +67,7 @@ static int select_sample_rate(AVCodec *codec) } /* select layout with the highest channel count */ -static int select_channel_layout(AVCodec *codec) +static int select_channel_layout(const AVCodec *codec) { const uint64_t *p; uint64_t best_ch_layout = 0; @@ -92,7 +92,7 @@ static int select_channel_layout(AVCodec *codec) int main(int argc, char **argv) { const char *filename; - AVCodec *codec; + const AVCodec *codec; AVCodecContext *c= NULL; AVFrame *frame; AVPacket pkt; |