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 | AVInputFormat *iformat = NULL; | 28 | AVInputFormat *iformat = NULL; |
| 29 | AVFormatContext *format_ctx = NULL; | 29 | AVFormatContext *format_ctx = NULL; |
| 30 | AVCodec *codec; | 30 | const AVCodec *codec; |
| 31 | AVCodecContext *codec_ctx = NULL; | 31 | AVCodecContext *codec_ctx = NULL; |
| 32 | AVCodecParameters *par; | 32 | AVCodecParameters *par; |
| 33 | AVFrame *frame = NULL; | 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 | static int open_stream(AVFilterContext *ctx, MovieStream *st) | 156 | static int open_stream(AVFilterContext *ctx, MovieStream *st) |
| 157 | { | 157 | { |
| 158 | AVCodec *codec; | 158 | const AVCodec *codec; |
| 159 | int ret; | 159 | int ret; |
| 160 | 160 | ||
| 161 | codec = avcodec_find_decoder(st->st->codecpar->codec_id); | 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 | AVFilterContext *ctx = inlink->dst; | 103 | AVFilterContext *ctx = inlink->dst; |
| 104 | MCDeintContext *mcdeint = ctx->priv; | 104 | MCDeintContext *mcdeint = ctx->priv; |
| 105 | AVCodec *enc; | 105 | const AVCodec *enc; |
| 106 | AVCodecContext *enc_ctx; | 106 | AVCodecContext *enc_ctx; |
| 107 | AVDictionary *opts = NULL; | 107 | AVDictionary *opts = NULL; |
| 108 | int ret; | 108 | int ret; |
| @@ -302,7 +302,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx) · 301 unmodified lines | |||
| 302 | AVDictionary *codec_opts = NULL; | 302 | AVDictionary *codec_opts = NULL; |
| 303 | AVFormatContext *fmt = NULL; | 303 | AVFormatContext *fmt = NULL; |
| 304 | AVCodecContext *dec_ctx = NULL; | 304 | AVCodecContext *dec_ctx = NULL; |
| 305 | AVCodec *dec = NULL; | 305 | const AVCodec *dec; |
| 306 | const AVCodecDescriptor *dec_desc; | 306 | const AVCodecDescriptor *dec_desc; |
| 307 | AVStream *st; | 307 | AVStream *st; |
| 308 | AVPacket pkt; | 308 | AVPacket pkt; |
| @@ -316,7 +316,7 @@ static int config_input(AVFilterLink *inlink) · 315 unmodified lines | |||
| 316 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); | 316 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); |
| 317 | int i; | 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 | if (!enc) { | 320 | if (!enc) { |
| 321 | av_log(ctx, AV_LOG_ERROR, "SNOW encoder not found.\n"); | 321 | av_log(ctx, AV_LOG_ERROR, "SNOW encoder not found.\n"); |
| 322 | return AVERROR(EINVAL); | 322 | return AVERROR(EINVAL); |