From 00d92f152b4fb6a396501a51edb6002cafc02302 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Fri, 26 Aug 2022 22:30:15 +0300 Subject: [PATCH] fix(ffmpeg) ignore deprecated warning (#3629) --- src/libs/ffmpeg/lv_ffmpeg.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libs/ffmpeg/lv_ffmpeg.c b/src/libs/ffmpeg/lv_ffmpeg.c index ff580cdc7..e41f43320 100644 --- a/src/libs/ffmpeg/lv_ffmpeg.c +++ b/src/libs/ffmpeg/lv_ffmpeg.c @@ -520,7 +520,7 @@ static int ffmpeg_open_codec_context(int * stream_idx, int ret; int stream_index; AVStream * st; - AVCodec * dec = NULL; + const AVCodec * dec = NULL; AVDictionary * opts = NULL; ret = av_find_best_stream(fmt_ctx, type, -1, -1, NULL, 0); @@ -764,7 +764,14 @@ static int ffmpeg_image_allocate(struct ffmpeg_context_s * ffmpeg_ctx) } /* initialize packet, set data to NULL, let the demuxer fill it */ +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif av_init_packet(&ffmpeg_ctx->pkt); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif ffmpeg_ctx->pkt.data = NULL; ffmpeg_ctx->pkt.size = 0;