[FFmpeg-devel] On need in AVFrame accessors

Nicolas George nicolas.george at normalesup.org
Wed Aug 22 14:03:10 CEST 2012

Le sextidi 6 fructidor, an CCXX, Andrey Utkin a écrit :
> The reason to have them was to... ehm, likely, to make faster
> accessing these fields than through av_opt_ptr,

Faster yes, but mostly more reliable: av_opt_ptr is type-pruned and needs to
be checked for failure.

>						  and ability to make
> accessors non-trivial if needed.

That was not a goal, even though it is a possibility if the need should

>	   Thus, no difference/benefit in them comparing with direct
> get/set operation.

The direct get/set operations are forbidden because the position of the
field is not part of the public ABI of the library: for these fields, and
only these, the developers are allowed to move them around in the structure
without bumping the major version. It breaks any dynamically-linked
application that accesses them directly.


  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/20120822/d1048ab9/attachment.asc>

More information about the ffmpeg-devel mailing list