mirror of
https://github.com/dguglielmi/sunny-overlay.git
synced 2025-12-06 20:22:38 +01:00
Compare commits
5 Commits
cb57607c3d
...
cfeb0750bc
| Author | SHA1 | Date | |
|---|---|---|---|
|
cfeb0750bc
|
|||
|
34104e3fb1
|
|||
|
970d45121d
|
|||
|
ca1213cae4
|
|||
|
675c0532ef
|
@@ -1,2 +1,6 @@
|
|||||||
|
AUX kodi-inputstream-ffmpegdirect-20.5.0-Fix-use-after-free-in-TimeshiftSegment.patch 1001 BLAKE2B ee4624253c0ab6bddd22a8ce5da969eb4e7acd22eb658eaf091fc826f714aa1314898b26a283b4e64233d4c5e5f4766a465bbbea4d4fe7b1997740a46f375d91 SHA512 608b45bf89b1430b6d25cf75f402567c1615e6457c20997efe7175aa631501eb967b5961b5dd9ff1b373de32c5d88f9a4b6da0cb92ef1866dfd81d149938e8aa
|
||||||
|
AUX kodi-inputstream-ffmpegdirect-20.5.0-Get-extradata-with-extract_extradata-BSF.patch 9834 BLAKE2B d26b4a56ddad02488868c94670440ab369a2016416a606b9f05386b615367028379279e270771d6635c69370e670178bd4dc80d4296d8ea69165b297708ded38 SHA512 77964f8d726e6bad4ea20fc9c5320f36a20047d9d9b999cc154f78e1f38612624a742c23a45ae060289e8507cc122fbd828b6f460e9449fa3e44bbc22ac61c14
|
||||||
|
AUX kodi-inputstream-ffmpegdirect-20.5.0-ffmpeg5.patch 13078 BLAKE2B 50fa84e7790b06960177cc48a097fca12d1f984bd41db335f98e01ebd2ecca5c4fad8e917af5af8a6d8bcc3408856542d44784834fecbd119a82ee75ec243df4 SHA512 63427c395dea7533c0909cbc43fecf8e14998bb108da50a43c2e755f8fa94cdd74751ce4b09ebc8db1780eaaf1fc717f5e4ed156443f78c9fdd6fb3bf730482b
|
||||||
|
AUX kodi-inputstream-ffmpegdirect-20.5.0-ffmpeg6.patch 1467 BLAKE2B 1a82346927a978c059e0d69bde63451a5463fec0035b8f32ea735a1fd26374254aec3f4b60041f13a49993542f9244ebf232c734b4aff5c5cece0d1bdde2320f SHA512 6c385aad0afa07379235ee7bd70a11e434befabde46dd5185c90ad85258d4ac5451c8426354f4d6e1e16b4e7c6e6a267843c4abba9a2e6601677c2e7023ce9b1
|
||||||
DIST kodi-inputstream-ffmpegdirect-20.5.0.tar.gz 289362 BLAKE2B 2e8c63bd47d54f84cade2acb092a8e3ef11c31170071f66b5f22d4aa6fd27992a22b19ecb8070ce7d952f80882fe617e5eaed70dcf325b9bdb579220ddd59688 SHA512 9db8e25f04400635e13cf7c79f7079be9c7ffbf427423abcfc449dcd06f6259dcf9ed1ad1eae1563db239978c8399e054e7c6adcbebb5cc70c4de1c01643d074
|
DIST kodi-inputstream-ffmpegdirect-20.5.0.tar.gz 289362 BLAKE2B 2e8c63bd47d54f84cade2acb092a8e3ef11c31170071f66b5f22d4aa6fd27992a22b19ecb8070ce7d952f80882fe617e5eaed70dcf325b9bdb579220ddd59688 SHA512 9db8e25f04400635e13cf7c79f7079be9c7ffbf427423abcfc449dcd06f6259dcf9ed1ad1eae1563db239978c8399e054e7c6adcbebb5cc70c4de1c01643d074
|
||||||
EBUILD kodi-inputstream-ffmpegdirect-20.5.0.ebuild 794 BLAKE2B 44d2ce9b511f0be4b5221fc48a6a7d85b624627695f609cc0bfa8151a71d014de06b4f6b9e7d9677d7baafd9d8ae02c3e914d6a2c959fa77cce67f08c2d32f91 SHA512 42122128ad256b70b854b52a3d39b7899040c2798748a3856400f355a5560001abc8b95147f9ca994053aa05d6d9fe556451e6cf558b4611d101acdab8017c44
|
EBUILD kodi-inputstream-ffmpegdirect-20.5.0-r1.ebuild 1009 BLAKE2B ddc966e1726f09aefc32379f6140f89b72f9735e3ad3222a934d90e744755441a86888be34efee88eff1e95518a1c1620b7579eb8236197109299a905ec44a7a SHA512 fa701ed4639e38b6f6157d31855c146bb9ad5277f2085f76b5b7d82fa52fbab2d0abc5ecbb202f5e4cfe7b66c4431e66aac10d6bddd15153a3ed9aaf4d8d16b3
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
From e6541a98b64631836336de17e57efa8e8e0b8425 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vasyl Gello <vasek.gello@gmail.com>
|
||||||
|
Date: Sat, 15 Oct 2022 16:09:20 +0000
|
||||||
|
Subject: [PATCH] Fix use-after-free in TimeshiftSegment
|
||||||
|
|
||||||
|
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
|
||||||
|
---
|
||||||
|
src/stream/TimeshiftSegment.cpp | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/stream/TimeshiftSegment.cpp b/src/stream/TimeshiftSegment.cpp
|
||||||
|
index 9323a44a..9e1cd09c 100644
|
||||||
|
--- a/src/stream/TimeshiftSegment.cpp
|
||||||
|
+++ b/src/stream/TimeshiftSegment.cpp
|
||||||
|
@@ -90,8 +90,8 @@ void TimeshiftSegment::AddPacket(DEMUX_PACKET* packet)
|
||||||
|
m_packetBuffer.emplace_back(newPacket);
|
||||||
|
|
||||||
|
int secondsSinceStart = 0;
|
||||||
|
- if (packet->pts != STREAM_NOPTS_VALUE && packet->pts > 0)
|
||||||
|
- secondsSinceStart = packet->pts / STREAM_TIME_BASE;
|
||||||
|
+ if (newPacket->pts != STREAM_NOPTS_VALUE && newPacket->pts > 0)
|
||||||
|
+ secondsSinceStart = newPacket->pts / STREAM_TIME_BASE;
|
||||||
|
|
||||||
|
if (secondsSinceStart != m_lastPacketSecondsSinceStart)
|
||||||
|
{
|
||||||
@@ -0,0 +1,290 @@
|
|||||||
|
From 07ea26d7ce6bde1350ceb15380f4908da454f004 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vasyl Gello <vasek.gello@gmail.com>
|
||||||
|
Date: Sat, 15 Oct 2022 16:17:48 +0000
|
||||||
|
Subject: [PATCH] ffmpeg5: Get extradata with extract_extradata BSF
|
||||||
|
|
||||||
|
Fixes the transport stream playback failures described in
|
||||||
|
https://bugs.debian.org/1016925
|
||||||
|
|
||||||
|
@Rogo95 made an excellent technical analysis of the root cause
|
||||||
|
and reported that to the bug thread.
|
||||||
|
|
||||||
|
Later on, James Almer (@jamrial) suggested the solution to use
|
||||||
|
extract_extradata bitstream filter to replace the removed split()
|
||||||
|
function.
|
||||||
|
|
||||||
|
Finally, I adapted the following code snippet:
|
||||||
|
https://gist.github.com/moonpfe/f6795d51294d91ee0f82f62ff6985db0
|
||||||
|
to Kodi and tested it by playing the affected files in TS format.
|
||||||
|
|
||||||
|
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
|
||||||
|
---
|
||||||
|
src/stream/FFmpegStream.cpp | 222 ++++++++++++++++++++++++++++++------
|
||||||
|
src/stream/FFmpegStream.h | 2 +
|
||||||
|
2 files changed, 192 insertions(+), 32 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/stream/FFmpegStream.cpp b/src/stream/FFmpegStream.cpp
|
||||||
|
index f2140a17..95d1da83 100644
|
||||||
|
--- a/src/stream/FFmpegStream.cpp
|
||||||
|
+++ b/src/stream/FFmpegStream.cpp
|
||||||
|
@@ -29,6 +29,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
+#include <libavcodec/bsf.h>
|
||||||
|
#include <libavutil/dict.h>
|
||||||
|
#include <libavutil/opt.h>
|
||||||
|
}
|
||||||
|
@@ -1586,6 +1587,168 @@ bool FFmpegStream::SeekTime(double time, bool backwards, double* startpts)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
+int FFmpegStream::GetPacketExtradata(const AVPacket* pkt, const AVCodecParserContext* parserCtx, AVCodecContext* codecCtx, uint8_t **p_extradata)
|
||||||
|
+{
|
||||||
|
+ int extradata_size = 0;
|
||||||
|
+
|
||||||
|
+ if (!pkt || !p_extradata)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ *p_extradata = nullptr;
|
||||||
|
+
|
||||||
|
+#if LIBAVFORMAT_BUILD >= AV_VERSION_INT(59, 0, 100)
|
||||||
|
+ /* extract_extradata bitstream filter is implemented only
|
||||||
|
+ * for certain codecs, as noted in discussion of PR#21248
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ AVCodecID codecId = codecCtx->codec_id;
|
||||||
|
+
|
||||||
|
+ // clang-format off
|
||||||
|
+ if (
|
||||||
|
+ codecId != AV_CODEC_ID_MPEG1VIDEO &&
|
||||||
|
+ codecId != AV_CODEC_ID_MPEG2VIDEO &&
|
||||||
|
+ codecId != AV_CODEC_ID_H264 &&
|
||||||
|
+ codecId != AV_CODEC_ID_HEVC &&
|
||||||
|
+ codecId != AV_CODEC_ID_MPEG4 &&
|
||||||
|
+ codecId != AV_CODEC_ID_VC1 &&
|
||||||
|
+ codecId != AV_CODEC_ID_AV1 &&
|
||||||
|
+ codecId != AV_CODEC_ID_AVS2 &&
|
||||||
|
+ codecId != AV_CODEC_ID_AVS3 &&
|
||||||
|
+ codecId != AV_CODEC_ID_CAVS
|
||||||
|
+ )
|
||||||
|
+ // clang-format on
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ AVBSFContext *bsf = nullptr;
|
||||||
|
+ AVPacket *dst_pkt = nullptr;
|
||||||
|
+ const AVBitStreamFilter *f;
|
||||||
|
+ AVPacket *pkt_ref = nullptr;
|
||||||
|
+ int ret = 0;
|
||||||
|
+ uint8_t *ret_extradata = nullptr;
|
||||||
|
+ size_t ret_extradata_size = 0;
|
||||||
|
+
|
||||||
|
+ f = av_bsf_get_by_name("extract_extradata");
|
||||||
|
+ if (!f)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ bsf = nullptr;
|
||||||
|
+ ret = av_bsf_alloc(f, &bsf);
|
||||||
|
+ if (ret < 0)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ bsf->par_in->codec_id = codecCtx->codec_id;
|
||||||
|
+
|
||||||
|
+ ret = av_bsf_init(bsf);
|
||||||
|
+ if (ret < 0)
|
||||||
|
+ {
|
||||||
|
+ av_bsf_free(&bsf);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ dst_pkt = av_packet_alloc();
|
||||||
|
+ pkt_ref = dst_pkt;
|
||||||
|
+
|
||||||
|
+ ret = av_packet_ref(pkt_ref, pkt);
|
||||||
|
+ if (ret < 0)
|
||||||
|
+ {
|
||||||
|
+ av_bsf_free(&bsf);
|
||||||
|
+ av_packet_free(&dst_pkt);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ret = av_bsf_send_packet(bsf, pkt_ref);
|
||||||
|
+ if (ret < 0)
|
||||||
|
+ {
|
||||||
|
+ av_packet_unref(pkt_ref);
|
||||||
|
+ av_bsf_free(&bsf);
|
||||||
|
+ av_packet_free(&dst_pkt);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ret = 0;
|
||||||
|
+ while (ret >= 0)
|
||||||
|
+ {
|
||||||
|
+ ret = av_bsf_receive_packet(bsf, pkt_ref);
|
||||||
|
+ if (ret < 0)
|
||||||
|
+ {
|
||||||
|
+ if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ret_extradata = av_packet_get_side_data(pkt_ref,
|
||||||
|
+ AV_PKT_DATA_NEW_EXTRADATA,
|
||||||
|
+ &ret_extradata_size);
|
||||||
|
+ if (ret_extradata &&
|
||||||
|
+ ret_extradata_size > 0 &&
|
||||||
|
+ ret_extradata_size < FF_MAX_EXTRADATA_SIZE)
|
||||||
|
+ {
|
||||||
|
+ *p_extradata = (uint8_t*)av_malloc(ret_extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
+ if (!*p_extradata)
|
||||||
|
+ {
|
||||||
|
+ Log(LOGLEVEL_ERROR,
|
||||||
|
+ "%s - failed to allocate %zu bytes for extradata",
|
||||||
|
+ __FUNCTION__,
|
||||||
|
+ ret_extradata_size);
|
||||||
|
+
|
||||||
|
+ av_packet_unref(pkt_ref);
|
||||||
|
+ av_bsf_free(&bsf);
|
||||||
|
+ av_packet_free(&dst_pkt);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ Log(LOGLEVEL_DEBUG,
|
||||||
|
+ "%s - fetching extradata, extradata_size(%zu)",
|
||||||
|
+ __FUNCTION__,
|
||||||
|
+ ret_extradata_size);
|
||||||
|
+
|
||||||
|
+ memcpy(*p_extradata, ret_extradata, ret_extradata_size);
|
||||||
|
+ memset(*p_extradata + ret_extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
+ extradata_size = ret_extradata_size;
|
||||||
|
+
|
||||||
|
+ av_packet_unref(pkt_ref);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ av_packet_unref(pkt_ref);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ av_bsf_free(&bsf);
|
||||||
|
+ av_packet_free(&dst_pkt);
|
||||||
|
+#else
|
||||||
|
+ if (codecCtx && parserCtx && parserCtx->parser && parserCtx->parser->split)
|
||||||
|
+ extradata_size = parserCtx->parser->split(codecCtx, pkt->data, pkt->size);
|
||||||
|
+
|
||||||
|
+ if (extradata_size <= 0 || extradata_size >= FF_MAX_EXTRADATA_SIZE)
|
||||||
|
+ {
|
||||||
|
+ Log(LOGLEVEL_DEBUG, "%s - fetched extradata of weird size %zd",
|
||||||
|
+ __FUNCTION__, extradata_size);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ *p_extradata = (uint8_t*)av_malloc(extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
+ if (!*p_extradata)
|
||||||
|
+ {
|
||||||
|
+ Log(LOGLEVEL_ERROR,
|
||||||
|
+ "%s - failed to allocate %zd bytes for extradata",
|
||||||
|
+ __FUNCTION__,
|
||||||
|
+ extradata_size);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ Log(LOGLEVEL_DEBUG,
|
||||||
|
+ "%s - fetching extradata, extradata_size(%zd)",
|
||||||
|
+ __FUNCTION__,
|
||||||
|
+ extradata_size);
|
||||||
|
+
|
||||||
|
+ memcpy(*p_extradata, pkt->data, extradata_size);
|
||||||
|
+ memset(*p_extradata + extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+ return extradata_size;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void FFmpegStream::ParsePacket(AVPacket* pkt)
|
||||||
|
{
|
||||||
|
AVStream* st = m_pFormatContext->streams[pkt->stream_index];
|
||||||
|
@@ -1617,43 +1780,38 @@ void FFmpegStream::ParsePacket(AVPacket* pkt)
|
||||||
|
|
||||||
|
if (parser->second->m_parserCtx &&
|
||||||
|
parser->second->m_parserCtx->parser &&
|
||||||
|
- parser->second->m_parserCtx->parser->split &&
|
||||||
|
!st->codecpar->extradata)
|
||||||
|
{
|
||||||
|
- int i = parser->second->m_parserCtx->parser->split(parser->second->m_codecCtx, pkt->data, pkt->size);
|
||||||
|
- if (i > 0 && i < FF_MAX_EXTRADATA_SIZE)
|
||||||
|
+ int i = GetPacketExtradata(pkt,
|
||||||
|
+ parser->second->m_parserCtx,
|
||||||
|
+ parser->second->m_codecCtx,
|
||||||
|
+ &st->codecpar->extradata);
|
||||||
|
+ if (i > 0)
|
||||||
|
{
|
||||||
|
- st->codecpar->extradata = (uint8_t*)av_malloc(i + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
- if (st->codecpar->extradata)
|
||||||
|
- {
|
||||||
|
- Log(LOGLEVEL_DEBUG, "CDVDDemuxFFmpeg::ParsePacket() fetching extradata, extradata_size(%d)", i);
|
||||||
|
- st->codecpar->extradata_size = i;
|
||||||
|
- memcpy(st->codecpar->extradata, pkt->data, i);
|
||||||
|
- memset(st->codecpar->extradata + i, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
+ st->codecpar->extradata_size = i;
|
||||||
|
|
||||||
|
- if (parser->second->m_parserCtx->parser->parser_parse)
|
||||||
|
+ if (parser->second->m_parserCtx->parser->parser_parse)
|
||||||
|
+ {
|
||||||
|
+ parser->second->m_codecCtx->extradata = st->codecpar->extradata;
|
||||||
|
+ parser->second->m_codecCtx->extradata_size = st->codecpar->extradata_size;
|
||||||
|
+ const uint8_t* outbufptr;
|
||||||
|
+ int bufSize;
|
||||||
|
+ parser->second->m_parserCtx->flags |= PARSER_FLAG_COMPLETE_FRAMES;
|
||||||
|
+ parser->second->m_parserCtx->parser->parser_parse(parser->second->m_parserCtx,
|
||||||
|
+ parser->second->m_codecCtx,
|
||||||
|
+ &outbufptr, &bufSize,
|
||||||
|
+ pkt->data, pkt->size);
|
||||||
|
+ parser->second->m_codecCtx->extradata = nullptr;
|
||||||
|
+ parser->second->m_codecCtx->extradata_size = 0;
|
||||||
|
+
|
||||||
|
+ if (parser->second->m_parserCtx->width != 0)
|
||||||
|
{
|
||||||
|
- parser->second->m_codecCtx->extradata = st->codecpar->extradata;
|
||||||
|
- parser->second->m_codecCtx->extradata_size = st->codecpar->extradata_size;
|
||||||
|
- const uint8_t* outbufptr;
|
||||||
|
- int bufSize;
|
||||||
|
- parser->second->m_parserCtx->flags |= PARSER_FLAG_COMPLETE_FRAMES;
|
||||||
|
- parser->second->m_parserCtx->parser->parser_parse(parser->second->m_parserCtx,
|
||||||
|
- parser->second->m_codecCtx,
|
||||||
|
- &outbufptr, &bufSize,
|
||||||
|
- pkt->data, pkt->size);
|
||||||
|
- parser->second->m_codecCtx->extradata = nullptr;
|
||||||
|
- parser->second->m_codecCtx->extradata_size = 0;
|
||||||
|
-
|
||||||
|
- if (parser->second->m_parserCtx->width != 0)
|
||||||
|
- {
|
||||||
|
- st->codecpar->width = parser->second->m_parserCtx->width;
|
||||||
|
- st->codecpar->height = parser->second->m_parserCtx->height;
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- {
|
||||||
|
- Log(LOGLEVEL_ERROR, "CDVDDemuxFFmpeg::ParsePacket() invalid width/height");
|
||||||
|
- }
|
||||||
|
+ st->codecpar->width = parser->second->m_parserCtx->width;
|
||||||
|
+ st->codecpar->height = parser->second->m_parserCtx->height;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ Log(LOGLEVEL_ERROR, "CDVDDemuxFFmpeg::ParsePacket() invalid width/height");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/src/stream/FFmpegStream.h b/src/stream/FFmpegStream.h
|
||||||
|
index 356905dd..f0634d0f 100644
|
||||||
|
--- a/src/stream/FFmpegStream.h
|
||||||
|
+++ b/src/stream/FFmpegStream.h
|
||||||
|
@@ -109,6 +109,8 @@ class FFmpegStream
|
||||||
|
bool IsPaused() { return m_speed == STREAM_PLAYSPEED_PAUSE; }
|
||||||
|
virtual bool CheckReturnEmptyOnPacketResult(int result);
|
||||||
|
|
||||||
|
+ int GetPacketExtradata(const AVPacket* pkt, const AVCodecParserContext* parserCtx, AVCodecContext* codecCtx, uint8_t **p_extradata);
|
||||||
|
+
|
||||||
|
int64_t m_demuxerId;
|
||||||
|
mutable std::recursive_mutex m_mutex;
|
||||||
|
double m_currentPts; // used for stream length estimation
|
||||||
@@ -0,0 +1,319 @@
|
|||||||
|
From fcad1884954ec1998f353750dd7332501e204ddb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vasyl Gello <vasek.gello@gmail.com>
|
||||||
|
Date: Sat, 15 Oct 2022 16:08:14 +0000
|
||||||
|
Subject: [PATCH] Adapt AlwinEsch's ffmpeg5 port patch
|
||||||
|
|
||||||
|
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
|
||||||
|
---
|
||||||
|
src/stream/FFmpegStream.cpp | 96 ++++++++++++++++++++++++++++++++-----
|
||||||
|
src/stream/FFmpegStream.h | 6 ++-
|
||||||
|
src/utils/FFmpegCompat.h | 20 ++++++++
|
||||||
|
3 files changed, 107 insertions(+), 15 deletions(-)
|
||||||
|
create mode 100644 src/utils/FFmpegCompat.h
|
||||||
|
|
||||||
|
diff --git a/src/stream/FFmpegStream.cpp b/src/stream/FFmpegStream.cpp
|
||||||
|
index 73e0963c..f2140a17 100644
|
||||||
|
--- a/src/stream/FFmpegStream.cpp
|
||||||
|
+++ b/src/stream/FFmpegStream.cpp
|
||||||
|
@@ -462,7 +462,14 @@ DEMUX_PACKET* FFmpegStream::DemuxRead()
|
||||||
|
// we already check for a valid m_streams[pPacket->iStreamId] above
|
||||||
|
else if (stream->type == INPUTSTREAM_TYPE_AUDIO)
|
||||||
|
{
|
||||||
|
- if (static_cast<DemuxStreamAudio*>(stream)->iChannels != m_pFormatContext->streams[pPacket->iStreamId]->codecpar->channels ||
|
||||||
|
+#if LIBAVCODEC_BUILD >= AV_VERSION_INT(59, 37, 100) && \
|
||||||
|
+ LIBAVUTIL_BUILD >= AV_VERSION_INT(57, 28, 100)
|
||||||
|
+ int codecparChannels =
|
||||||
|
+ m_pFormatContext->streams[pPacket->iStreamId]->codecpar->ch_layout.nb_channels;
|
||||||
|
+#else
|
||||||
|
+ int codecparChannels = m_pFormatContext->streams[pPacket->iStreamId]->codecpar->channels;
|
||||||
|
+#endif
|
||||||
|
+ if (static_cast<DemuxStreamAudio*>(stream)->iChannels != codecparChannels ||
|
||||||
|
static_cast<DemuxStreamAudio*>(stream)->iSampleRate != m_pFormatContext->streams[pPacket->iStreamId]->codecpar->sample_rate)
|
||||||
|
{
|
||||||
|
// content has changed
|
||||||
|
@@ -658,7 +665,7 @@ bool FFmpegStream::Aborted()
|
||||||
|
|
||||||
|
bool FFmpegStream::Open(bool fileinfo)
|
||||||
|
{
|
||||||
|
- AVInputFormat* iformat = NULL;
|
||||||
|
+ FFMPEG_FMT_CONST AVInputFormat* iformat = nullptr;
|
||||||
|
std::string strFile;
|
||||||
|
m_streaminfo = !m_isRealTimeStream && !m_reopen;;
|
||||||
|
m_currentPts = STREAM_NOPTS_VALUE;
|
||||||
|
@@ -729,6 +736,8 @@ bool FFmpegStream::Open(bool fileinfo)
|
||||||
|
m_streaminfo = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // https://github.com/FFmpeg/FFmpeg/blob/56450a0ee4/doc/APIchanges#L18-L26
|
||||||
|
+#if LIBAVFORMAT_BUILD < AV_VERSION_INT(59, 0, 100)
|
||||||
|
if (iformat && (strcmp(iformat->name, "mov,mp4,m4a,3gp,3g2,mj2") == 0))
|
||||||
|
{
|
||||||
|
CURL url(m_streamUrl);
|
||||||
|
@@ -736,6 +745,7 @@ bool FFmpegStream::Open(bool fileinfo)
|
||||||
|
if (!url.GetProtocol().empty() && !url.IsProtocol("file"))
|
||||||
|
m_pFormatContext->iformat->flags |= AVFMT_NOGENSEARCH;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
// we need to know if this is matroska, avi or sup later
|
||||||
|
m_bMatroska = strncmp(m_pFormatContext->iformat->name, "matroska", 8) == 0; // for "matroska.webm"
|
||||||
|
@@ -785,8 +795,11 @@ bool FFmpegStream::Open(bool fileinfo)
|
||||||
|
// if format can be nonblocking, let's use that
|
||||||
|
m_pFormatContext->flags |= AVFMT_FLAG_NONBLOCK;
|
||||||
|
|
||||||
|
- // deprecated, will be always set in future versions
|
||||||
|
+ // https://github.com/FFmpeg/FFmpeg/blob/d682ae70b4/doc/APIchanges#L18-L21
|
||||||
|
+#if LIBAVFORMAT_BUILD < AV_VERSION_INT(57, 66, 105) && \
|
||||||
|
+ LIBAVCODEC_BUILD < AV_VERSION_INT(57, 83, 101)
|
||||||
|
m_pFormatContext->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
UpdateCurrentPTS();
|
||||||
|
|
||||||
|
@@ -828,12 +841,23 @@ bool FFmpegStream::Open(bool fileinfo)
|
||||||
|
{
|
||||||
|
int idx = m_pFormatContext->programs[i]->stream_index[j];
|
||||||
|
AVStream* st = m_pFormatContext->streams[idx];
|
||||||
|
+#if LIBAVFORMAT_BUILD >= AV_VERSION_INT(59, 3, 100)
|
||||||
|
+ // Related to https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210429143825.53040-1-jamrial@gmail.com/
|
||||||
|
+ // has been replaced with AVSTREAM_EVENT_FLAG_NEW_PACKETS.
|
||||||
|
+ if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && (st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS)) ||
|
||||||
|
+ (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && st->codecpar->sample_rate > 0))
|
||||||
|
+ {
|
||||||
|
+ nProgram = i;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && st->codec_info_nb_frames > 0) ||
|
||||||
|
(st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && st->codecpar->sample_rate > 0))
|
||||||
|
{
|
||||||
|
nProgram = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -870,7 +894,7 @@ bool FFmpegStream::Open(bool fileinfo)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
-bool FFmpegStream::OpenWithFFmpeg(AVInputFormat* iformat, const AVIOInterruptCB& int_cb)
|
||||||
|
+bool FFmpegStream::OpenWithFFmpeg(FFMPEG_FMT_CONST AVInputFormat* iformat, const AVIOInterruptCB& int_cb)
|
||||||
|
{
|
||||||
|
Log(LOGLEVEL_INFO, "%s - IO handled by FFmpeg's AVFormat", __FUNCTION__);
|
||||||
|
|
||||||
|
@@ -959,7 +983,7 @@ bool FFmpegStream::OpenWithFFmpeg(AVInputFormat* iformat, const AVIOInterruptCB&
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
-bool FFmpegStream::OpenWithCURL(AVInputFormat* iformat)
|
||||||
|
+bool FFmpegStream::OpenWithCURL(FFMPEG_FMT_CONST AVInputFormat* iformat)
|
||||||
|
{
|
||||||
|
Log(LOGLEVEL_INFO, "%s - IO handled by Kodi's cURL", __FUNCTION__);
|
||||||
|
|
||||||
|
@@ -1039,8 +1063,7 @@ bool FFmpegStream::OpenWithCURL(AVInputFormat* iformat)
|
||||||
|
// is present, we assume it is PCM audio.
|
||||||
|
// AC3 is always wrapped in iec61937 (ffmpeg "spdif"), while DTS
|
||||||
|
// may be just padded.
|
||||||
|
- AVInputFormat* iformat2;
|
||||||
|
- iformat2 = av_find_input_format("spdif");
|
||||||
|
+ FFMPEG_FMT_CONST AVInputFormat* iformat2 = av_find_input_format("spdif");
|
||||||
|
|
||||||
|
if (iformat2 && iformat2->read_probe(&pd) > AVPROBE_SCORE_MAX / 4)
|
||||||
|
{
|
||||||
|
@@ -1147,11 +1170,19 @@ void FFmpegStream::UpdateCurrentPTS()
|
||||||
|
if (idx >= 0)
|
||||||
|
{
|
||||||
|
AVStream* stream = m_pFormatContext->streams[idx];
|
||||||
|
+#if LIBAVFORMAT_BUILD >= AV_VERSION_INT(59, 3, 100)
|
||||||
|
+ if (stream && m_pkt.pkt.dts != (int64_t)AV_NOPTS_VALUE)
|
||||||
|
+ {
|
||||||
|
+ double ts = ConvertTimestamp(m_pkt.pkt.dts, stream->time_base.den, stream->time_base.num);
|
||||||
|
+ m_currentPts = ts;
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
if (stream && stream->cur_dts != (int64_t)AV_NOPTS_VALUE)
|
||||||
|
{
|
||||||
|
double ts = ConvertTimestamp(stream->cur_dts, stream->time_base.den, stream->time_base.num);
|
||||||
|
m_currentPts = ts;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1230,9 +1261,15 @@ bool FFmpegStream::IsProgramChange()
|
||||||
|
return true;
|
||||||
|
if (m_pFormatContext->streams[idx]->codecpar->codec_id != stream->codec)
|
||||||
|
return true;
|
||||||
|
+#if LIBAVCODEC_BUILD >= AV_VERSION_INT(59, 37, 100) && \
|
||||||
|
+ LIBAVUTIL_BUILD >= AV_VERSION_INT(57, 28, 100)
|
||||||
|
+ int codecparChannels =
|
||||||
|
+ m_pFormatContext->streams[idx]->codecpar->ch_layout.nb_channels;
|
||||||
|
+#else
|
||||||
|
+ int codecparChannels = m_pFormatContext->streams[idx]->codecpar->channels;
|
||||||
|
+#endif
|
||||||
|
if (m_pFormatContext->streams[idx]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
|
||||||
|
- m_pFormatContext->streams[idx]->codecpar->channels !=
|
||||||
|
- static_cast<DemuxStreamAudio*>(stream)->iChannels)
|
||||||
|
+ codecparChannels != static_cast<DemuxStreamAudio*>(stream)->iChannels)
|
||||||
|
return true;
|
||||||
|
if (m_pFormatContext->streams[idx]->codecpar->extradata_size != static_cast<int>(stream->ExtraSize))
|
||||||
|
return true;
|
||||||
|
@@ -1564,7 +1601,7 @@ void FFmpegStream::ParsePacket(AVPacket* pkt)
|
||||||
|
|
||||||
|
parser->second->m_parserCtx = av_parser_init(st->codecpar->codec_id);
|
||||||
|
|
||||||
|
- AVCodec* codec = avcodec_find_decoder(st->codecpar->codec_id);
|
||||||
|
+ FFMPEG_FMT_CONST AVCodec* codec = avcodec_find_decoder(st->codecpar->codec_id);
|
||||||
|
if (codec == nullptr)
|
||||||
|
{
|
||||||
|
Log(LOGLEVEL_ERROR, "%s - can't find decoder", __FUNCTION__);
|
||||||
|
@@ -1641,7 +1678,11 @@ TRANSPORT_STREAM_STATE FFmpegStream::TransportStreamAudioState()
|
||||||
|
{
|
||||||
|
if (!m_startTime)
|
||||||
|
{
|
||||||
|
+#if LIBAVFORMAT_BUILD >= AV_VERSION_INT(59, 3, 100)
|
||||||
|
+ m_startTime = av_rescale(m_pkt.pkt.dts, st->time_base.num, st->time_base.den) - 0.000001;
|
||||||
|
+#else
|
||||||
|
m_startTime = av_rescale(st->cur_dts, st->time_base.num, st->time_base.den) - 0.000001;
|
||||||
|
+#endif
|
||||||
|
m_seekStream = idx;
|
||||||
|
}
|
||||||
|
return TRANSPORT_STREAM_STATE::READY;
|
||||||
|
@@ -1661,7 +1702,11 @@ TRANSPORT_STREAM_STATE FFmpegStream::TransportStreamAudioState()
|
||||||
|
{
|
||||||
|
if (!m_startTime)
|
||||||
|
{
|
||||||
|
+#if LIBAVFORMAT_BUILD >= AV_VERSION_INT(59, 3, 100)
|
||||||
|
+ m_startTime = av_rescale(m_pkt.pkt.dts, st->time_base.num, st->time_base.den) - 0.000001;
|
||||||
|
+#else
|
||||||
|
m_startTime = av_rescale(st->cur_dts, st->time_base.num, st->time_base.den) - 0.000001;
|
||||||
|
+#endif
|
||||||
|
m_seekStream = i;
|
||||||
|
}
|
||||||
|
return TRANSPORT_STREAM_STATE::READY;
|
||||||
|
@@ -1694,7 +1739,11 @@ TRANSPORT_STREAM_STATE FFmpegStream::TransportStreamVideoState()
|
||||||
|
{
|
||||||
|
if (!m_startTime)
|
||||||
|
{
|
||||||
|
+#if LIBAVFORMAT_BUILD >= AV_VERSION_INT(59, 3, 100)
|
||||||
|
+ m_startTime = av_rescale(m_pkt.pkt.dts, st->time_base.num, st->time_base.den) - 0.000001;
|
||||||
|
+#else
|
||||||
|
m_startTime = av_rescale(st->cur_dts, st->time_base.num, st->time_base.den) - 0.000001;
|
||||||
|
+#endif
|
||||||
|
m_seekStream = idx;
|
||||||
|
}
|
||||||
|
return TRANSPORT_STREAM_STATE::READY;
|
||||||
|
@@ -1714,7 +1763,11 @@ TRANSPORT_STREAM_STATE FFmpegStream::TransportStreamVideoState()
|
||||||
|
{
|
||||||
|
if (!m_startTime)
|
||||||
|
{
|
||||||
|
+#if LIBAVFORMAT_BUILD >= AV_VERSION_INT(59, 3, 100)
|
||||||
|
+ m_startTime = av_rescale(m_pkt.pkt.dts, st->time_base.num, st->time_base.den) - 0.000001;
|
||||||
|
+#else
|
||||||
|
m_startTime = av_rescale(st->cur_dts, st->time_base.num, st->time_base.den) - 0.000001;
|
||||||
|
+#endif
|
||||||
|
m_seekStream = i;
|
||||||
|
}
|
||||||
|
return TRANSPORT_STREAM_STATE::READY;
|
||||||
|
@@ -1824,14 +1877,31 @@ DemuxStream* FFmpegStream::AddStream(int streamIdx)
|
||||||
|
{
|
||||||
|
DemuxStreamAudioFFmpeg* st = new DemuxStreamAudioFFmpeg(pStream);
|
||||||
|
stream = st;
|
||||||
|
- st->iChannels = pStream->codecpar->channels;
|
||||||
|
+#if LIBAVCODEC_BUILD >= AV_VERSION_INT(59, 37, 100) && \
|
||||||
|
+ LIBAVUTIL_BUILD >= AV_VERSION_INT(57, 28, 100)
|
||||||
|
+ int codecparChannels = pStream->codecpar->ch_layout.nb_channels;
|
||||||
|
+ int codecparChannelLayout = pStream->codecpar->ch_layout.u.mask;
|
||||||
|
+#else
|
||||||
|
+ int codecparChannels = pStream->codecpar->channels;
|
||||||
|
+ int codecparChannelLayout = pStream->codecpar->channel_layout;
|
||||||
|
+#endif
|
||||||
|
+ st->iChannels = codecparChannels;
|
||||||
|
+ st->iChannelLayout = codecparChannelLayout;
|
||||||
|
st->iSampleRate = pStream->codecpar->sample_rate;
|
||||||
|
st->iBlockAlign = pStream->codecpar->block_align;
|
||||||
|
st->iBitRate = static_cast<int>(pStream->codecpar->bit_rate);
|
||||||
|
st->iBitsPerSample = pStream->codecpar->bits_per_raw_sample;
|
||||||
|
- st->iChannelLayout = pStream->codecpar->channel_layout;
|
||||||
|
char buf[32] = { 0 };
|
||||||
|
+ // https://github.com/FFmpeg/FFmpeg/blob/6ccc3989d15/doc/APIchanges#L50-L53
|
||||||
|
+#if LIBAVCODEC_BUILD >= AV_VERSION_INT(59, 37, 100) && \
|
||||||
|
+ LIBAVUTIL_BUILD >= AV_VERSION_INT(57, 28, 100)
|
||||||
|
+ AVChannelLayout layout = {};
|
||||||
|
+ av_channel_layout_from_mask(&layout, st->iChannelLayout);
|
||||||
|
+ av_channel_layout_describe(&layout, buf, sizeof(buf));
|
||||||
|
+ av_channel_layout_uninit(&layout);
|
||||||
|
+#else
|
||||||
|
av_get_channel_layout_string(buf, 31, st->iChannels, st->iChannelLayout);
|
||||||
|
+#endif
|
||||||
|
st->m_channelLayoutName = buf;
|
||||||
|
if (st->iBitsPerSample == 0)
|
||||||
|
st->iBitsPerSample = pStream->codecpar->bits_per_coded_sample;
|
||||||
|
@@ -2070,7 +2140,7 @@ std::string FFmpegStream::GetStreamCodecName(int iStreamId)
|
||||||
|
return strName;
|
||||||
|
}
|
||||||
|
|
||||||
|
- AVCodec* codec = avcodec_find_decoder(stream->codec);
|
||||||
|
+ FFMPEG_FMT_CONST AVCodec* codec = avcodec_find_decoder(stream->codec);
|
||||||
|
if (codec)
|
||||||
|
strName = codec->name;
|
||||||
|
}
|
||||||
|
diff --git a/src/stream/FFmpegStream.h b/src/stream/FFmpegStream.h
|
||||||
|
index bf8a50f9..356905dd 100644
|
||||||
|
--- a/src/stream/FFmpegStream.h
|
||||||
|
+++ b/src/stream/FFmpegStream.h
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
+#include "../utils/FFmpegCompat.h"
|
||||||
|
#include "../utils/HttpProxy.h"
|
||||||
|
#include "../utils/Properties.h"
|
||||||
|
#include "BaseStream.h"
|
||||||
|
@@ -33,6 +34,7 @@ extern "C"
|
||||||
|
#include <libavcodec/avcodec.h>
|
||||||
|
#include <libavformat/avformat.h>
|
||||||
|
#include <libavutil/mastering_display_metadata.h>
|
||||||
|
+#include <libavutil/version.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef __GNUC__
|
||||||
|
@@ -117,8 +119,8 @@ class FFmpegStream
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool Open(bool fileinfo);
|
||||||
|
- bool OpenWithFFmpeg(AVInputFormat* iformat, const AVIOInterruptCB& int_cb);
|
||||||
|
- bool OpenWithCURL(AVInputFormat* iformat);
|
||||||
|
+ bool OpenWithFFmpeg(FFMPEG_FMT_CONST AVInputFormat* iformat, const AVIOInterruptCB& int_cb);
|
||||||
|
+ bool OpenWithCURL(FFMPEG_FMT_CONST AVInputFormat* iformat);
|
||||||
|
AVDictionary* GetFFMpegOptionsFromInput();
|
||||||
|
void ResetVideoStreams();
|
||||||
|
double ConvertTimestamp(int64_t pts, int den, int num);
|
||||||
|
diff --git a/src/utils/FFmpegCompat.h b/src/utils/FFmpegCompat.h
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..46cff53f
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/utils/FFmpegCompat.h
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2005-2022 Team Kodi
|
||||||
|
+ * This file is part of Kodi - https://kodi.tv
|
||||||
|
+ *
|
||||||
|
+ * SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
+ * See LICENSES/README.md for more information.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#pragma once
|
||||||
|
+
|
||||||
|
+extern "C" {
|
||||||
|
+#include <libavformat/avformat.h>
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+// https://github.com/FFmpeg/FFmpeg/blob/56450a0ee4/doc/APIchanges#L18-L26
|
||||||
|
+#if LIBAVFORMAT_BUILD >= AV_VERSION_INT(59, 0, 100)
|
||||||
|
+#define FFMPEG_FMT_CONST const
|
||||||
|
+#else
|
||||||
|
+#define FFMPEG_FMT_CONST
|
||||||
|
+#endif
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
From 98ccdd2f4263eb1590c65f175c11deeec18fe6c2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||||
|
Date: Fri, 3 Mar 2023 19:33:04 +0100
|
||||||
|
Subject: [PATCH] Fix build with ffmpeg 6.0
|
||||||
|
|
||||||
|
This feature was removed from ffmpeg:
|
||||||
|
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=add33e370d241d947209c914de1bf062fe44d58e
|
||||||
|
---
|
||||||
|
src/stream/FFmpegStream.cpp | 2 --
|
||||||
|
1 file changed, 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/stream/FFmpegStream.cpp b/src/stream/FFmpegStream.cpp
|
||||||
|
index 341062ed..0996b446 100644
|
||||||
|
--- a/src/stream/FFmpegStream.cpp
|
||||||
|
+++ b/src/stream/FFmpegStream.cpp
|
||||||
|
@@ -920,7 +920,6 @@ bool FFmpegStream::OpenWithFFmpeg(const AVInputFormat* iformat, const AVIOInterr
|
||||||
|
// We only process this condition for manifest streams when this setting is disabled
|
||||||
|
if (!kodi::addon::GetSettingBoolean("useFastOpenForManifestStreams") || m_manifestType.empty())
|
||||||
|
{
|
||||||
|
- m_pFormatContext->flags |= AVFMT_FLAG_PRIV_OPT;
|
||||||
|
if (avformat_open_input(&m_pFormatContext, strFile.c_str(), iformat, &options) < 0)
|
||||||
|
{
|
||||||
|
Log(LOGLEVEL_DEBUG, "Error, could not open file %s", CURL::GetRedacted(strFile).c_str());
|
||||||
|
@@ -935,7 +934,6 @@ bool FFmpegStream::OpenWithFFmpeg(const AVInputFormat* iformat, const AVIOInterr
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pFormatContext->interrupt_callback = int_cb;
|
||||||
|
- m_pFormatContext->flags &= ~AVFMT_FLAG_PRIV_OPT;
|
||||||
|
options = GetFFMpegOptionsFromInput();
|
||||||
|
av_dict_set_int(&options, "load_all_variants", 0, AV_OPT_SEARCH_CHILDREN);
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ BDEPEND="
|
|||||||
"
|
"
|
||||||
|
|
||||||
COMMON_DEPEND="
|
COMMON_DEPEND="
|
||||||
media-video/ffmpeg[encode,libxml2,zlib]
|
media-video/ffmpeg:=[encode,libxml2,zlib]
|
||||||
virtual/libiconv
|
virtual/libiconv
|
||||||
app-arch/bzip2
|
app-arch/bzip2
|
||||||
=media-tv/kodi-20*
|
=media-tv/kodi-20*
|
||||||
@@ -37,6 +37,13 @@ RDEPEND="
|
|||||||
${COMMON_DEPEND}
|
${COMMON_DEPEND}
|
||||||
"
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${P}-ffmpeg5.patch
|
||||||
|
"${FILESDIR}"/${P}-Get-extradata-with-extract_extradata-BSF.patch
|
||||||
|
"${FILESDIR}"/${P}-Fix-use-after-free-in-TimeshiftSegment.patch
|
||||||
|
"${FILESDIR}"/${P}-ffmpeg6.patch
|
||||||
|
)
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
[ -d depends ] && rm -rf depends || die
|
[ -d depends ] && rm -rf depends || die
|
||||||
cmake_src_prepare
|
cmake_src_prepare
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
BDEPEND=virtual/pkgconfig >=dev-util/ninja-1.8.2 >=dev-util/cmake-3.20.5
|
BDEPEND=virtual/pkgconfig >=dev-util/ninja-1.8.2 >=dev-util/cmake-3.20.5
|
||||||
DEFINED_PHASES=compile configure install prepare test
|
DEFINED_PHASES=compile configure install prepare test
|
||||||
DEPEND=media-video/ffmpeg[encode,libxml2,zlib] virtual/libiconv app-arch/bzip2 =media-tv/kodi-20*
|
DEPEND=media-video/ffmpeg:=[encode,libxml2,zlib] virtual/libiconv app-arch/bzip2 =media-tv/kodi-20*
|
||||||
DESCRIPTION=Kodi's FFMpeg Direct Inputstream addon
|
DESCRIPTION=Kodi's FFMpeg Direct Inputstream addon
|
||||||
EAPI=8
|
EAPI=8
|
||||||
HOMEPAGE=https://github.com/xbmc/inputstream.ffmpegdirect
|
HOMEPAGE=https://github.com/xbmc/inputstream.ffmpegdirect
|
||||||
INHERIT=kodi-addon
|
INHERIT=kodi-addon
|
||||||
KEYWORDS=~amd64 ~arm ~arm64 ~x86
|
KEYWORDS=~amd64 ~arm ~arm64 ~x86
|
||||||
LICENSE=GPL-2
|
LICENSE=GPL-2
|
||||||
RDEPEND=media-video/ffmpeg[encode,libxml2,zlib] virtual/libiconv app-arch/bzip2 =media-tv/kodi-20*
|
RDEPEND=media-video/ffmpeg:=[encode,libxml2,zlib] virtual/libiconv app-arch/bzip2 =media-tv/kodi-20*
|
||||||
SLOT=0
|
SLOT=0
|
||||||
SRC_URI=https://github.com/xbmc/inputstream.ffmpegdirect/archive/20.5.0-Nexus.tar.gz -> kodi-inputstream-ffmpegdirect-20.5.0.tar.gz
|
SRC_URI=https://github.com/xbmc/inputstream.ffmpegdirect/archive/20.5.0-Nexus.tar.gz -> kodi-inputstream-ffmpegdirect-20.5.0.tar.gz
|
||||||
_eclasses_=cmake fc2f89084f590ac95c004ea95b0d2f80 flag-o-matic be27a904c614cb93ae037762dc69bcc2 kodi-addon 6be6829ba2a8f3a3f057ac4d6fa65bd6 multilib c19072c3cd7ac5cb21de013f7e9832e0 multiprocessing b4e253ab22cef7b1085e9b67c7a3b730 ninja-utils f3010c780f65d1bb5aea15a9af1adc9c toolchain-funcs 862d337d98edb576796827be2c6b11ca xdg-utils baea6080dd821f5562d715887954c9d3
|
_eclasses_=cmake fc2f89084f590ac95c004ea95b0d2f80 flag-o-matic be27a904c614cb93ae037762dc69bcc2 kodi-addon 6be6829ba2a8f3a3f057ac4d6fa65bd6 multilib c19072c3cd7ac5cb21de013f7e9832e0 multiprocessing b4e253ab22cef7b1085e9b67c7a3b730 ninja-utils f3010c780f65d1bb5aea15a9af1adc9c toolchain-funcs 862d337d98edb576796827be2c6b11ca xdg-utils baea6080dd821f5562d715887954c9d3
|
||||||
_md5_=0e62c935f85412e9f3f5c029376cc24c
|
_md5_=c8f864f3b6300580df6eb93fd0ac4c17
|
||||||
Reference in New Issue
Block a user