Hi Gianfranco, On 04.11.2015 10:49, Gianfranco Costamagna wrote: >> That's not correct: the alternatives have been present for a >> long time, so that the deprecated functions will be removed >> in the next version. > > thanks, this is something I was wondering, even if I couldn't easily find > when they were introduced.
This is documented in FFmpeg's APIchanges [1], also installed in ffmpeg-doc. >> While this will probably work, it's not entirely correct. >> You can use: >> * for AVPixelFormat, AV_PIX_FMT_*: >> #if LIBAVUTIL_VERSION_MAJOR > 51 >> * for av_frame_alloc/av_frame_free: >> #if LIBAVUTIL_VERSION_MAJOR > 52 >> * for av_stream_get_end_pts: >> #if LIBAVFORMAT_VERSION_MAJOR > 55 > > thanks, I committed this on the upstream pull request, giving you the commit > authorship. Unfortunately, you didn't copy this correctly... On 04.11.2015 11:01, Gianfranco Costamagna wrote: > unfortunately this change breaks libav 4:0.8.17-0ubuntu0.12.04.1 ...so it doesn't work. You always used LIBAVCODEC_VERSION_MAJOR, while that should have been LIBAVUTIL_VERSION_MAJOR or LIBAVFORMAT_VERSION_MAJOR. If done correctly, it will surely work fine with Libav 0.8, which has only libavutil 51 and libavformat 53. > While I like the solution, I'm really worried about backporting hedgewars, > (and this is why I took 55 as separator), because that way I wasn't changing > the "current" behaviour. > > Now the next backports will take some new functionalities, while before they > were using a deprecated code... > > This sounds scary to me, but if upstream applies the patch I have one year > until the next backport need > (I'm backporting hedgewars without the above fixes for this new release) > > let me know if you can reassure me because the changes are "safe" or whatever > :) Yes, these changes are safe: * AVPixelFormat, AV_PIX_FMT_*: Only the names changed (due to being too generic before). The binary will be identical. * av_frame_alloc/av_frame_free: These functions are now in libavutil, while avcodec_alloc_frame/avcodec_free_frame were in libavcodec. Actually hedgewars used av_free to free the frames, which can leak memory, so using the correct free function is definitely an improvement. * for av_stream_get_end_pts: This is just a getter function for pts.val, which is made private, no functional change. Best regards, Andreas 1: https://anonscm.debian.org/cgit/pkg-multimedia/ffmpeg.git/tree/doc/APIchanges

