Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-03-29 14:30:16 +0300
committerClément Bœsch <u@pkh.me>2017-03-29 14:30:16 +0300
commitf38e7566c69bc6da35eb22e29384d202c87c054a (patch)
tree72ba08e7fcd6174fea2b70ae99aaa759c4847ec2 /doc
parentb785af48687fa839fbc25045d2201335753304b3 (diff)
parentc00a11ab383ff276a2ab2fdba577945e48d465be (diff)
Merge commit 'c00a11ab383ff276a2ab2fdba577945e48d465be'
* commit 'c00a11ab383ff276a2ab2fdba577945e48d465be': examples/encode_audio: constify AVCodec instances Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/encode_audio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/examples/encode_audio.c b/doc/examples/encode_audio.c
index 5932521b2c..b788775a56 100644
--- a/doc/examples/encode_audio.c
+++ b/doc/examples/encode_audio.c
@@ -39,7 +39,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;
@@ -52,7 +52,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;
@@ -69,7 +69,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;
@@ -94,7 +94,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;