From 4afe07378fb1362afd8405390cb5590171783312 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 27 Oct 2021 21:28:50 +0200 Subject: [PATCH] ffmpeg compil versions warnnings Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fcb392908bde7b650ef1142f2b2dba97eb048aa3 Author: Jacek Jendrzej Date: 2021-10-27 (Wed, 27 Oct 2021) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- lib/libdvbsub/dvbsubtitle.cpp | 3 ++- src/driver/audiodec/ffmpegdec.cpp | 2 ++ src/driver/record.cpp | 2 ++ src/driver/streamts.cpp | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp index 943fc162c..cd49be53d 100644 --- a/lib/libdvbsub/dvbsubtitle.cpp +++ b/lib/libdvbsub/dvbsubtitle.cpp @@ -266,8 +266,9 @@ int cDvbSubtitleConverter::Convert(const uchar *Data, int Length, int64_t pts) Bitmaps = new cDvbSubtitleBitmaps(pts); AVSubtitle * sub = Bitmaps->GetSub(); - +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 133, 100) av_init_packet(&avpkt); +#endif avpkt.data = (uint8_t*) Data; avpkt.size = Length; diff --git a/src/driver/audiodec/ffmpegdec.cpp b/src/driver/audiodec/ffmpegdec.cpp index b5b4caf55..5536d504d 100644 --- a/src/driver/audiodec/ffmpegdec.cpp +++ b/src/driver/audiodec/ffmpegdec.cpp @@ -286,7 +286,9 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state, AVFrame *frame = NULL; AVPacket rpacket; +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 133, 100) av_init_packet(&rpacket); +#endif c->channel_layout = c->channel_layout ? c->channel_layout : AV_CH_LAYOUT_STEREO; av_opt_set_int(swr, "in_channel_layout", c->channel_layout, 0); diff --git a/src/driver/record.cpp b/src/driver/record.cpp index e6d468bf5..2617e484f 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -2422,7 +2422,9 @@ void CStreamRec::run() double total = 0; while (!stopped) { +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 133, 100) av_init_packet(&pkt); +#endif if (av_read_frame(ifcx, &pkt) < 0) break; if (pkt.stream_index < 0) diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index d5835ea3f..75fe52a84 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -961,7 +961,9 @@ void CStreamStream::run() } while (!stopped) { +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 133, 100) av_init_packet(&pkt); +#endif if (av_read_frame(ifcx, &pkt) < 0) break; if (pkt.stream_index < 0)