[FFmpeg-devel] [PATCH 4/8] lavu/opt: extend AVOptionRange by second value

Nicolas George george at nsup.org
Mon Mar 24 10:26:20 CET 2014


Le tridi 3 germinal, an CCXXII, Lukasz Marek a écrit :
> The problem I noticed later is how to free it.
> I added nb_components to AVOptionRanges, but this field is
> duplicated for each component which is probably not the best.
> If you have any other solution to solve freeing then give a hint.

If you control the allocation of the AVOptionRanges (which for now seems to
be the case as it happens only in av_opt_query_ranges_default();
av_option_ranges_alloc(n) would be useful for later), then you can add an
empty item at the end to mark the end of the array. Or wrap the array in a
larger structure and use magic pointer arithmetics to find that structure
from the array, but that is hackish.

I do not think it is a sever issue though. Your current solution seems
reasonable.

Regards,

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


More information about the ffmpeg-devel mailing list