On date Thursday 2012-02-16 17:45:00 +0200, Andrey Utkin encoded: > --- > libavutil/dict.c | 35 +++++++++++++++++++++++++++++++++++ > libavutil/dict.h | 7 +++++++ > 2 files changed, 42 insertions(+), 0 deletions(-) > > diff --git a/libavutil/dict.c b/libavutil/dict.c [...] > /** > + * Get AVDictionary from string in format "opt1=val1,opt_i=val_i,..." > + * > + * @return 0 on success, otherwise an error code <0 > + */ > +int av_dict_from_string(const char *arg, AVDictionary **dict);
I suggest to put a verb in the function name: int av_dict_make_from_string(const char *arg, AVDictionary **dict); slightly abusing the English grammar (make is transitive), or "create". Also I'd find more intuitive: int av_dict_make_from_string(AVDictionary **dict, const char *arg); which is read as: dict <- arg Another possible extension would consist into makeing the function work with a non-NULL dictionary, so that items are added in the existing dictionary (but may be difficult to implement in case of invalid input, since it is not clear which should be the "right" behavior). -- FFmpeg = Fantastic Fancy Magical Portentous Extreme Game _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
