@@ -939,7 +939,7 @@ int avfilter_init_dict(AVFilterContext *ctx,
AVDictionary **options)
int avfilter_init_str(AVFilterContext *filter, const char *args)
{
AVDictionary *options = NULL;
- AVDictionaryEntry *e;
+ const AVDictionaryEntry *e;
int ret = 0;
if (args && *args) {
@@ -69,7 +69,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (s->action == ACTION_START) {
av_dict_set_int(&in->metadata, START_TIME_KEY, t, 0);
} else if (s->action == ACTION_STOP) {
- AVDictionaryEntry *e = av_dict_get(in->metadata,
START_TIME_KEY, NULL, 0);
+ const AVDictionaryEntry *e = av_dict_get(in->metadata,
START_TIME_KEY, NULL, 0);
if (e) {
const int64_t start = strtoll(e->value, NULL, 0);
const int64_t diff = t - start;
@@ -163,7 +163,7 @@ static int filter_frame(AVFilterLink *inlink,
AVFrame *in)
DrawGraphContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVDictionary *metadata;
- AVDictionaryEntry *e;
+ const AVDictionaryEntry *e;
AVFrame *out = s->out;
AVFrame *clone = NULL;
int64_t in_pts, out_pts;
@@ -306,7 +306,7 @@ static int filter_frame(AVFilterLink *inlink,
AVFrame *frame)
AVFilterLink *outlink = ctx->outputs[0];
MetadataContext *s = ctx->priv;
AVDictionary **metadata = &frame->metadata;
- AVDictionaryEntry *e;
+ const AVDictionaryEntry *e;
e = av_dict_get(*metadata, !s->key ? "" : s->key, NULL,
!s->key ? AV_DICT_IGNORE_SUFFIX: 0);
@@ -304,8 +304,8 @@ static double get_scene_score(AVFilterContext *ctx,
AVFrame *frame)
static double get_concatdec_select(AVFrame *frame, int64_t pts)
{
AVDictionary *metadata = frame->metadata;
- AVDictionaryEntry *start_time_entry = av_dict_get(metadata,
"lavf.concatdec.start_time", NULL, 0);
- AVDictionaryEntry *duration_entry = av_dict_get(metadata,
"lavf.concatdec.duration", NULL, 0);
+ const AVDictionaryEntry *start_time_entry = av_dict_get(metadata,
"lavf.concatdec.start_time", NULL, 0);
+ const AVDictionaryEntry *duration_entry = av_dict_get(metadata,
"lavf.concatdec.duration", NULL, 0);
if (start_time_entry) {
int64_t start_time = strtoll(start_time_entry->value, NULL, 10);
if (pts >= start_time) {
@@ -135,7 +135,7 @@ static int filter_frame(AVFilterLink *inlink,
AVFrame *in)
{
AVFilterContext *ctx = inlink->dst;
CoverContext *cover = ctx->priv;
- AVDictionaryEntry *ex, *ey, *ew, *eh;
+ const AVDictionaryEntry *ex, *ey, *ew, *eh;
int x = -1, y = -1, w = -1, h = -1;
char *xendptr = NULL, *yendptr = NULL, *wendptr = NULL, *hendptr =
NULL;
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
@@ -1032,7 +1032,7 @@ static int func_metadata(AVFilterContext *ctx,
AVBPrint *bp,
char *fct, unsigned argc, char **argv, int tag)
{
DrawTextContext *s = ctx->priv;
- AVDictionaryEntry *e = av_dict_get(s->metadata, argv[0], NULL, 0);
+ const AVDictionaryEntry *e = av_dict_get(s->metadata, argv[0],
NULL, 0);
if (e && e->value)
av_bprintf(bp, "%s", e->value);
@@ -551,7 +551,7 @@ static int config_props(AVFilterLink *outlink)
scale->out_range == AVCOL_RANGE_JPEG, 0);
if (scale->opts) {
- AVDictionaryEntry *e = NULL;
+ const AVDictionaryEntry *e = NULL;
while ((e = av_dict_get(scale->opts, "", e,
AV_DICT_IGNORE_SUFFIX))) {
if ((ret = av_opt_set(s, e->key, e->value, 0)) < 0)
return ret;