Unified · Split
| @@ -37,7 +37,7 @@ · 36 unmodified lines | |||
| 37 | #include "libavutil/samplefmt.h" | 37 | #include "libavutil/samplefmt.h" |
| 38 | 38 | ||
| 39 | /* check that a given sample format is supported by the encoder */ | 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 | const enum AVSampleFormat *p = codec->sample_fmts; | 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 | /* just pick the highest supported samplerate */ | 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 | const int *p; | 55 | const int *p; |
| 56 | int best_samplerate = 0; | 56 | int best_samplerate = 0; |
| @@ -67,7 +67,7 @@ static int select_sample_rate(AVCodec *codec) · 10 unmodified lines | |||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | /* select layout with the highest channel count */ | 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 | const uint64_t *p; | 72 | const uint64_t *p; |
| 73 | uint64_t best_ch_layout = 0; | 73 | uint64_t best_ch_layout = 0; |
| @@ -92,7 +92,7 @@ static int select_channel_layout(AVCodec *codec) · 18 unmodified lines | |||
| 92 | int main(int argc, char **argv) | 92 | int main(int argc, char **argv) |
| 93 | { | 93 | { |
| 94 | const char *filename; | 94 | const char *filename; |
| 95 | AVCodec *codec; | 95 | const AVCodec *codec; |
| 96 | AVCodecContext *c= NULL; | 96 | AVCodecContext *c= NULL; |
| 97 | AVFrame *frame; | 97 | AVFrame *frame; |
| 98 | AVPacket pkt; | 98 | AVPacket pkt; |