[FFmpeg-devel] [PATCH 1/2] lavu/opt: fix av_opt_get_key_value() API.

Nicolas George nicolas.george at normalesup.org
Mon Nov 12 17:25:01 CET 2012


Le duodi 22 brumaire, an CCXXI, Michael Niedermayer a écrit :
> doesnt ropts already point to the delimiter after the function ?

No, the function skips the delimiter too. It is slightly more practical for
the use case "parse all the key=value pairs in the whole string".

The delimiter can be found with ropts[-1], but it does not work if the key
is omitted and the value is empty. But an empty key can also be escaped.
Therefore, if someone wants to know the delimiter, they need to save the old
value of ropts.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121112/903cd4a4/attachment.asc>


More information about the ffmpeg-devel mailing list