Turn off the interpretation of the warning that some functionality has become obsolete, as errors.
And then figure it out - why. Usually in the documentation, that in the commentary next to the marked outdated option there is an indication of what to use instead.
For example, for avpicture_get_size :
/** * @deprecated use av_image_get_buffer_size() instead. */ attribute_deprecated int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
those. an explicit indication that in return you should use av_image_get_buffer_size() . The latter has an alignment attribute, which in your case should be specified in 1.
Similarly for avpicture_fill and for av_free_packet . Instead of the latter, due to the introduction of reference counting for packages, one should use av_packet_unref() and so on.
In general, the examples are not official, it is worth asking the owner of the repository.