[FFmpeg-devel] [PATCH] Enhance libavcodec/opt.c API
Stefano Sabatini
stefano.sabatini-lala
Sun May 11 18:08:06 CEST 2008
Hi all,
one of the main problems with the AVOption API is that it is
impossible to distinguish when setting an option value if an option is
simply not present in a context, or the provided value is wrong.
This proposal adds a function named av_set_opt_string() which takes as
parameter the pointer to the option to be set, this solution could
eventually be extended to the other av_set_* and av_get_* functions
(also improving efficiency in many cases).
In this way you can check for the presence of an option with
av_opt_find(), then use the av_set_opt_string() function on the found
option to set its value, if the value provided is wrong then it will
return NULL.
BTW I'm not adding documentation for consistency with the rest of
opt.h (but I'll update the already posted patch which documents opt.h
if this passes).
Best regards.
--
FFmpeg = Funny and Friendly MultiPurpose EnGine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-an-av-set-opt-string-fun-00.patch
Type: text/x-diff
Size: 2246 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080511/bd48d397/attachment.patch>
More information about the ffmpeg-devel
mailing list