The user has no business modifying the underlying AVCodec.
Showing the changes to libavfilter (5 of 9 files). Show all
Unified · Split
| @@ -27,7 +27,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4], · 26 unmodified lines | ||
| 27 | 27 | { |
| 28 | 28 | AVInputFormat *iformat = NULL; |
| 29 | 29 | AVFormatContext *format_ctx = NULL; |
| 30 | − AVCodec *codec; | |
| 30 | + const AVCodec *codec; | |
| 31 | 31 | AVCodecContext *codec_ctx = NULL; |
| 32 | 32 | AVCodecParameters *par; |
| 33 | 33 | AVFrame *frame = NULL; |
| @@ -155,7 +155,7 @@ static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec) · 154 unmodified lines | ||
| 155 | 155 | |
| 156 | 156 | static int open_stream(AVFilterContext *ctx, MovieStream *st) |
| 157 | 157 | { |
| 158 | − AVCodec *codec; | |
| 158 | + const AVCodec *codec; | |
| 159 | 159 | int ret; |
| 160 | 160 | |
| 161 | 161 | codec = avcodec_find_decoder(st->st->codecpar->codec_id); |
| @@ -102,7 +102,7 @@ static int config_props(AVFilterLink *inlink) · 101 unmodified lines | ||
| 102 | 102 | { |
| 103 | 103 | AVFilterContext *ctx = inlink->dst; |
| 104 | 104 | MCDeintContext *mcdeint = ctx->priv; |
| 105 | − AVCodec *enc; | |
| 105 | + const AVCodec *enc; | |
| 106 | 106 | AVCodecContext *enc_ctx; |
| 107 | 107 | AVDictionary *opts = NULL; |
| 108 | 108 | int ret; |
| @@ -302,7 +302,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx) · 301 unmodified lines | ||
| 302 | 302 | AVDictionary *codec_opts = NULL; |
| 303 | 303 | AVFormatContext *fmt = NULL; |
| 304 | 304 | AVCodecContext *dec_ctx = NULL; |
| 305 | − AVCodec *dec = NULL; | |
| 305 | + const AVCodec *dec; | |
| 306 | 306 | const AVCodecDescriptor *dec_desc; |
| 307 | 307 | AVStream *st; |
| 308 | 308 | AVPacket pkt; |
| @@ -316,7 +316,7 @@ static int config_input(AVFilterLink *inlink) · 315 unmodified lines | ||
| 316 | 316 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); |
| 317 | 317 | int i; |
| 318 | 318 | |
| 319 | − AVCodec *enc = avcodec_find_encoder(AV_CODEC_ID_SNOW); | |
| 319 | + const AVCodec *enc = avcodec_find_encoder(AV_CODEC_ID_SNOW); | |
| 320 | 320 | if (!enc) { |
| 321 | 321 | av_log(ctx, AV_LOG_ERROR, "SNOW encoder not found.\n"); |
| 322 | 322 | return AVERROR(EINVAL); |