Showing the changes to doc/examples/encode_audio.c (1 of 1 file). Show all
Unified · Split
| @@ -37,7 +37,7 @@ · 36 unmodified lines | ||
| 37 | 37 | #include "libavutil/samplefmt.h" |
| 38 | 38 | |
| 39 | 39 | /* check that a given sample format is supported by the encoder */ |
| 40 | −static int check_sample_fmt(AVCodec *codec, enum AVSampleFormat sample_fmt) | |
| 40 | +static int check_sample_fmt(const AVCodec *codec, enum AVSampleFormat sample_fmt) | |
| 41 | 41 | { |
| 42 | 42 | const enum AVSampleFormat *p = codec->sample_fmts; |
| 43 | 43 | |
| @@ -50,7 +50,7 @@ static int check_sample_fmt(AVCodec *codec, enum AVSampleFormat sample_fmt) · 6 unmodified lines | ||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /* just pick the highest supported samplerate */ |
| 53 | −static int select_sample_rate(AVCodec *codec) | |
| 53 | +static int select_sample_rate(const AVCodec *codec) | |
| 54 | 54 | { |
| 55 | 55 | const int *p; |
| 56 | 56 | int best_samplerate = 0; |
| @@ -67,7 +67,7 @@ static int select_sample_rate(AVCodec *codec) · 10 unmodified lines | ||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /* select layout with the highest channel count */ |
| 70 | −static int select_channel_layout(AVCodec *codec) | |
| 70 | +static int select_channel_layout(const AVCodec *codec) | |
| 71 | 71 | { |
| 72 | 72 | const uint64_t *p; |
| 73 | 73 | uint64_t best_ch_layout = 0; |
| @@ -92,7 +92,7 @@ static int select_channel_layout(AVCodec *codec) · 18 unmodified lines | ||
| 92 | 92 | int main(int argc, char **argv) |
| 93 | 93 | { |
| 94 | 94 | const char *filename; |
| 95 | − AVCodec *codec; | |
| 95 | + const AVCodec *codec; | |
| 96 | 96 | AVCodecContext *c= NULL; |
| 97 | 97 | AVFrame *frame; |
| 98 | 98 | AVPacket pkt; |