[FFmpeg-devel] [libav-devel] [PATCH] lavu: Add av_dict_from_string()

Andrey Utkin andrey.krieger.utkin at gmail.com
Fri Feb 24 18:45:33 CET 2012


2012/2/24 Stefano Sabatini <stefasab at gmail.com>:
> 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

This last point is fixed in newer version of patch, i've sent it only
to libav-devel.
http://lists.libav.org/pipermail/libav-devel/2012-February/021993.html

> 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).

I think this function works with non-empty dict (didn't test though).
Where did you find the constraint?

Thanks for all the comments.

P.S. I'm not sure i'll have time to improve this patch soon.

-- 
Andrey Utkin


More information about the ffmpeg-devel mailing list