1 Description: Fix build against FFmpeg 5.0
2 Author: Nicholas Guriev <guriev-ns@ya.ru>
3 Bug-Debian: https://bugs.debian.org/1004821
4 Last-Update: Tue, 28 Jun 2022 23:33:19 +0300
6 --- a/examples/am7xxx-play.c
7 +++ b/examples/am7xxx-play.c
12 +#include <libavcodec/avcodec.h>
13 #include <libavdevice/avdevice.h>
14 #include <libavformat/avformat.h>
15 #include <libavutil/imgutils.h>
16 @@ -49,17 +50,19 @@ static int video_input_init(struct video
17 const char *input_path,
18 AVDictionary **input_options)
20 - AVInputFormat *input_format = NULL;
21 + AVInputFormat const *input_format = NULL;
22 AVFormatContext *input_format_ctx;
23 AVCodecParameters *input_codec_params;
24 AVCodecContext *input_codec_ctx;
25 - AVCodec *input_codec;
26 + AVCodec const *input_codec;
30 avdevice_register_all();
31 +#if LIBAVCODEC_VERSION_MAJOR < 59
32 avcodec_register_all();
36 if (input_format_string) {
37 /* find the desired input format */
38 @@ -158,7 +161,7 @@ static int video_output_init(struct vide
41 AVCodecContext *output_codec_ctx;
42 - AVCodec *output_codec;
43 + AVCodec const *output_codec;
44 unsigned int new_output_width;
45 unsigned int new_output_height;