History

fftools, libavcodec, libavfilter: Add const to some AVCodec *

The user has no business modifying the underlying AVCodec.

Andreas Rheinhardt committed 6 years ago

Commit 00864321 parent b091df79 files · +14 −12Browse files

Showing the changes to libavfilter (5 of 9 files). Show all

Unified · Split

5 files
  1. libavfilter/lavfutils.c +1 −1
  2. libavfilter/src_movie.c +1 −1
  3. libavfilter/vf_mcdeint.c +1 −1
  4. libavfilter/vf_subtitles.c +1 −1
  5. libavfilter/vf_uspp.c +1 −1
libavfilter/lavfutils.c+1−1
@@ -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;
libavfilter/src_movie.c+1−1
@@ -155,7 +155,7 @@ static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec) · 154 unmodified lines
155 155
156static int open_stream(AVFilterContext *ctx, MovieStream *st)156static 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);
libavfilter/vf_mcdeint.c+1−1
@@ -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;
libavfilter/vf_subtitles.c+1−1
@@ -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;
libavfilter/vf_uspp.c+1−1
@@ -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);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t