[FFmpeg-devel] Recent API/ABI fix

Nicolas George nicolas.george at normalesup.org
Sat Nov 10 11:45:31 CET 2012


I realize that av_opt_get_key_value(), that I introduced last week, is
slightly flawed: if the key is omitted, determining what delimiter caused
the parsing to stop is awkward. This is not severe, but it could be better.
I wonder how I can make things better. I see a few solution.

0. Leave it like that.

1. Add a "char *redelim" argument to return the delimiter. This is an API
   and ABI break.

2. Return the delimiter as a positive return value. This is also an API and
   ABI break since the doc says "0 for success" (some apps may write
   "if(!ret)" instead of "if(ret < 0)".

3. Add a flag to implement 1 (using varargs) or 2.

4. Implement av_opt_get_key_value2 and deprecate the first.

Considering that the function was added officially less than a week ago, I
think an API/ABI break is acceptable. We may add a rule, and a comment in
APIchanges, that any API less than a month old is considered still unstable
and may change without more compatibility quirks than a bump.

Comments?

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/20121110/a46d04d4/attachment.asc>


More information about the ffmpeg-devel mailing list