[MPlayer-dev-eng] [PATCH] Add support for arbitrary metadata in the lavf muxer.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Sep 23 19:46:13 CEST 2011
On Tue, Sep 20, 2011 at 02:02:57PM -0700, Alex Converse wrote:
> +static int parse_avmetadata(AVDictionary **v, const char *metadata_string) {
> + char *start, *str;
> + start = str = strdup(metadata_string);
> +
> + while (str && *str) {
> + char *next_opt, *arg;
> +
> + next_opt = strchr(str, ',');
> + if (next_opt)
> + *next_opt++ = 0;
> +
> + arg = strchr(str, '=');
> + if (arg)
> + *arg++ = 0;
> +
> + if (av_dict_set(v, str, arg, 0)) {
> + free(start);
> + return -1;
> + }
> + str = next_opt;
> + }
That makes it impossible to specify metadata containing = or ,.
I would have suggested to reuse parse_str from subopt-helper.c
but I see that might get a bit messy.
Also misses a documentation update.
More information about the MPlayer-dev-eng
mailing list