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
2727 {
2828 AVInputFormat *iformat = NULL;
2929 AVFormatContext *format_ctx = NULL;
30− AVCodec *codec;
30+ const AVCodec *codec;
3131 AVCodecContext *codec_ctx = NULL;
3232 AVCodecParameters *par;
3333 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
155155
156156 static int open_stream(AVFilterContext *ctx, MovieStream *st)
157157 {
158− AVCodec *codec;
158+ const AVCodec *codec;
159159 int ret;
160160
161161 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
102102 {
103103 AVFilterContext *ctx = inlink->dst;
104104 MCDeintContext *mcdeint = ctx->priv;
105− AVCodec *enc;
105+ const AVCodec *enc;
106106 AVCodecContext *enc_ctx;
107107 AVDictionary *opts = NULL;
108108 int ret;
libavfilter/vf_subtitles.c+1−1
@@ -302,7 +302,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx) · 301 unmodified lines
302302 AVDictionary *codec_opts = NULL;
303303 AVFormatContext *fmt = NULL;
304304 AVCodecContext *dec_ctx = NULL;
305− AVCodec *dec = NULL;
305+ const AVCodec *dec;
306306 const AVCodecDescriptor *dec_desc;
307307 AVStream *st;
308308 AVPacket pkt;
libavfilter/vf_uspp.c+1−1
@@ -316,7 +316,7 @@ static int config_input(AVFilterLink *inlink) · 315 unmodified lines
316316 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
317317 int i;
318318
319− AVCodec *enc = avcodec_find_encoder(AV_CODEC_ID_SNOW);
319+ const AVCodec *enc = avcodec_find_encoder(AV_CODEC_ID_SNOW);
320320 if (!enc) {
321321 av_log(ctx, AV_LOG_ERROR, "SNOW encoder not found.\n");
322322 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