@@ -938,7 +938,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) {
@@ -124,7 +124,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;
@@ -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);
@@ -549,7 +549,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;
Treat values returned from av_dict_get() as const, since they are internal to AVDictionary. Signed-off-by: Chad Fraleigh <chadf@triularity.org> --- libavfilter/avfilter.c | 2 +- libavfilter/f_bench.c | 2 +- libavfilter/f_drawgraph.c | 2 +- libavfilter/f_metadata.c | 2 +- libavfilter/f_select.c | 4 ++-- libavfilter/vf_cover_rect.c | 2 +- libavfilter/vf_drawtext.c | 2 +- libavfilter/vf_scale.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-)