Description: Fix build against FFmpeg 5.0 Author: Nicholas Guriev Bug-Debian: https://bugs.debian.org/1004821 Last-Update: Tue, 28 Jun 2022 23:33:19 +0300 --- a/examples/am7xxx-play.c +++ b/examples/am7xxx-play.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -49,17 +50,19 @@ static int video_input_init(struct video const char *input_path, AVDictionary **input_options) { - AVInputFormat *input_format = NULL; + AVInputFormat const *input_format = NULL; AVFormatContext *input_format_ctx; AVCodecParameters *input_codec_params; AVCodecContext *input_codec_ctx; - AVCodec *input_codec; + AVCodec const *input_codec; int video_index; int ret; avdevice_register_all(); +#if LIBAVCODEC_VERSION_MAJOR < 59 avcodec_register_all(); av_register_all(); +#endif if (input_format_string) { /* find the desired input format */ @@ -158,7 +161,7 @@ static int video_output_init(struct vide am7xxx_device *dev) { AVCodecContext *output_codec_ctx; - AVCodec *output_codec; + AVCodec const *output_codec; unsigned int new_output_width; unsigned int new_output_height; int ret;