diff --git a/packages/multimedia/ffmpeg/patches/ffmpeg-2.8-kodi.patch b/packages/multimedia/ffmpeg/patches/ffmpeg-2.8-kodi.patch index 5b4c9b3ecd..fdc42b0984 100644 --- a/packages/multimedia/ffmpeg/patches/ffmpeg-2.8-kodi.patch +++ b/packages/multimedia/ffmpeg/patches/ffmpeg-2.8-kodi.patch @@ -1,7 +1,7 @@ -From beecab7dbe5f2c3c8b1c01d10656505b073b7c10 Mon Sep 17 00:00:00 2001 +From 0e110e0dba8a22ea481fa5615ebcef6c15a96463 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Sun, 11 Sep 2011 19:04:51 +0200 -Subject: [PATCH 01/12] Support raw dvdsub palette as stored on normal dvd's +Subject: [PATCH 01/13] Support raw dvdsub palette as stored on normal dvd's This is how the palette is stored on dvd's. Currently only xbmc passes the palette information to libavcodec @@ -53,10 +53,10 @@ index 7120f10..4440f00 100644 int i; av_log(avctx, AV_LOG_DEBUG, "palette:"); -From 612990b5e41df5b52ad6463e6b804945d37dd3e2 Mon Sep 17 00:00:00 2001 +From 748abb8aa4837e3e6808d75c508dbc233ce5e9df Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Mon, 28 Jun 2010 01:55:31 -0400 -Subject: [PATCH 02/12] if av_read_packet returns AVERROR_IO, we are done. +Subject: [PATCH 02/13] if av_read_packet returns AVERROR_IO, we are done. ffmpeg's codecs might or might not handle returning any completed demuxed packets correctly @@ -78,10 +78,10 @@ index e67147c..88c51fd 100644 for (i = 0; i < s->nb_streams; i++) { st = s->streams[i]; -From b0576542dafb1bea44f752a6aea59dce5162959b Mon Sep 17 00:00:00 2001 +From 0b8ae9da4f78a4681dee2a6a3f3deeef059d1eac Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Mon, 28 Jun 2010 02:10:50 -0400 -Subject: [PATCH 03/12] added: Ticket #7187, TV Teletext support for DVB EBU +Subject: [PATCH 03/13] added: Ticket #7187, TV Teletext support for DVB EBU Teletext streams --- @@ -105,7 +105,7 @@ index 9d38b59..bc1b1b9 100644 AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. AV_CODEC_ID_TTF = 0x18000, diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c -index ed0a86b..b285f2b 100644 +index 65824dd..338861e 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -756,6 +756,8 @@ static const StreamType DESC_types[] = { @@ -118,17 +118,17 @@ index ed0a86b..b285f2b 100644 }; -From e1ba26f0389b1033341a3dea7fe600c93be790fe Mon Sep 17 00:00:00 2001 +From 173b882438900514f8c2793f2bc49cd6722cbd6a Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Sun, 18 Sep 2011 19:16:34 +0200 -Subject: [PATCH 04/12] Don't accept mpegts PMT that isn't current +Subject: [PATCH 04/13] Don't accept mpegts PMT that isn't current --- libavformat/mpegts.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c -index b285f2b..0643bc7 100644 +index 338861e..d4168c8 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -585,6 +585,7 @@ typedef struct SectionHeader { @@ -147,7 +147,7 @@ index b285f2b..0643bc7 100644 h->version = (val >> 1) & 0x1f; val = get8(pp, p_end); if (val < 0) -@@ -2019,6 +2021,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len +@@ -2020,6 +2022,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len return; if (ts->skip_changes) return; @@ -157,17 +157,17 @@ index b285f2b..0643bc7 100644 if (skip_identical(h, tssf)) return; -From 262670f195f933c553f446f1283911854ed4f05c Mon Sep 17 00:00:00 2001 +From 3abc23ee058c91b24b1fb81303dcee508a1de49d Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Sun, 18 Sep 2011 19:17:23 +0200 -Subject: [PATCH 05/12] Don't reparse PMT unless it's version has changed +Subject: [PATCH 05/13] Don't reparse PMT unless it's version has changed --- libavformat/mpegts.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c -index 0643bc7..ea7d335 100644 +index d4168c8..9c6f6dc 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -91,6 +91,7 @@ struct MpegTSFilter { @@ -186,7 +186,7 @@ index 0643bc7..ea7d335 100644 return filter; } -@@ -2023,6 +2025,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len +@@ -2024,6 +2026,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len return; if (!h->current) return; @@ -198,10 +198,10 @@ index 0643bc7..ea7d335 100644 if (skip_identical(h, tssf)) return; -From aedee74aa7ec24958938a9baa0bff1d12004d305 Mon Sep 17 00:00:00 2001 +From ed09c6ad8d86980207dd0ea56fdfb79e227adbb6 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Fri, 9 Jul 2010 16:43:31 -0400 -Subject: [PATCH 06/12] Read PID timestamps as well as PCR timestamps to find +Subject: [PATCH 06/13] Read PID timestamps as well as PCR timestamps to find location in mpegts stream --- @@ -209,10 +209,10 @@ Subject: [PATCH 06/12] Read PID timestamps as well as PCR timestamps to find 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c -index ea7d335..b46f875 100644 +index 9c6f6dc..a4db558 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c -@@ -2518,6 +2518,44 @@ static void seek_back(AVFormatContext *s, AVIOContext *pb, int64_t pos) { +@@ -2519,6 +2519,44 @@ static void seek_back(AVFormatContext *s, AVIOContext *pb, int64_t pos) { av_log(s, pb->seekable ? AV_LOG_ERROR : AV_LOG_INFO, "Unable to seek back to the start\n"); } @@ -257,7 +257,7 @@ index ea7d335..b46f875 100644 static int mpegts_read_header(AVFormatContext *s) { MpegTSContext *ts = s->priv_data; -@@ -2723,6 +2761,7 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, +@@ -2724,6 +2762,7 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, uint8_t buf[TS_PACKET_SIZE]; int pcr_l, pcr_pid = ((PESContext *)s->streams[stream_index]->priv_data)->pcr_pid; @@ -265,7 +265,7 @@ index ea7d335..b46f875 100644 int pos47 = ts->pos47_full % ts->raw_packet_size; pos = ((*ppos + ts->raw_packet_size - 1 - pos47) / ts->raw_packet_size) * -@@ -2744,6 +2783,11 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, +@@ -2745,6 +2784,11 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, *ppos = pos; return timestamp; } @@ -277,7 +277,7 @@ index ea7d335..b46f875 100644 pos += ts->raw_packet_size; } -@@ -2843,7 +2887,7 @@ AVInputFormat ff_mpegts_demuxer = { +@@ -2844,7 +2888,7 @@ AVInputFormat ff_mpegts_demuxer = { .read_header = mpegts_read_header, .read_packet = mpegts_read_packet, .read_close = mpegts_read_close, @@ -286,7 +286,7 @@ index ea7d335..b46f875 100644 .flags = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT, .priv_class = &mpegts_class, }; -@@ -2855,7 +2899,7 @@ AVInputFormat ff_mpegtsraw_demuxer = { +@@ -2856,7 +2900,7 @@ AVInputFormat ff_mpegtsraw_demuxer = { .read_header = mpegts_read_header, .read_packet = mpegts_raw_read_packet, .read_close = mpegts_read_close, @@ -296,10 +296,10 @@ index ea7d335..b46f875 100644 .priv_class = &mpegtsraw_class, }; -From e4bdfe863c6db2180d948ba04cd6c702307b510a Mon Sep 17 00:00:00 2001 +From ce8186048f2ac760582c6860cfb176bd4d427f98 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Sat, 22 Oct 2011 19:01:38 +0200 -Subject: [PATCH 07/12] Get stream durations using read_timestamp +Subject: [PATCH 07/13] Get stream durations using read_timestamp --- libavformat/utils.c | 39 +++++++++++++++++++++++++++++++++++++++ @@ -363,10 +363,10 @@ index 88c51fd..966f4d2 100644 /* less precise: use bitrate info */ estimate_timings_from_bit_rate(ic); -From 97bc03588a385a50743fdb1e49863c0ef133fc75 Mon Sep 17 00:00:00 2001 +From b9cb8fe46a30ba867c6f50ac228f3c25762be73b Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Wed, 8 Dec 2010 14:03:43 +0000 -Subject: [PATCH 08/12] changed: allow 4 second skew between streams in mov +Subject: [PATCH 08/13] changed: allow 4 second skew between streams in mov before attempting to seek --- @@ -374,10 +374,10 @@ Subject: [PATCH 08/12] changed: allow 4 second skew between streams in mov 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c -index a8d72b4..8523806 100644 +index 735e956..d4e0748 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c -@@ -4511,8 +4511,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st) +@@ -4611,8 +4611,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st) if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) || (s->pb->seekable && ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb && @@ -389,10 +389,10 @@ index a8d72b4..8523806 100644 best_dts = dts; *st = avst; -From ad0ab7047a2041b6c152468de1a739644064c6e8 Mon Sep 17 00:00:00 2001 +From feea0da005cea0e0b2580f17395e394d81e1c427 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Fri, 26 Nov 2010 20:56:48 +0000 -Subject: [PATCH 09/12] fixed: memleak in mpegts demuxer on some malformed (??) +Subject: [PATCH 09/13] fixed: memleak in mpegts demuxer on some malformed (??) mpegts files with too large pes packets at-visions sample file brokenStream.mpg @@ -401,10 +401,10 @@ at-visions sample file brokenStream.mpg 1 file changed, 6 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c -index b46f875..3f6c9e1 100644 +index a4db558..492d9c7 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c -@@ -867,6 +867,10 @@ static void reset_pes_packet_state(PESContext *pes) +@@ -868,6 +868,10 @@ static void reset_pes_packet_state(PESContext *pes) static void new_pes_packet(PESContext *pes, AVPacket *pkt) { @@ -415,7 +415,7 @@ index b46f875..3f6c9e1 100644 av_init_packet(pkt); pkt->buf = pes->buffer; -@@ -2714,6 +2718,8 @@ static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt) +@@ -2715,6 +2719,8 @@ static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt) pkt->size = -1; ts->pkt = pkt; @@ -425,20 +425,20 @@ index b46f875..3f6c9e1 100644 if (ret < 0) { av_free_packet(ts->pkt); -From 43f9a7b6c3b2343cb71c8c691773abd38e0a3af0 Mon Sep 17 00:00:00 2001 +From b86ed91dab824a9d2bd137662a810e1c4c5a1367 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Mon, 28 Jun 2010 21:26:54 +0000 -Subject: [PATCH 10/12] Speed up mpegts av_find_stream_info +Subject: [PATCH 10/13] Speed up mpegts av_find_stream_info --- libavformat/mpegts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c -index 3f6c9e1..8112d89 100644 +index 492d9c7..29d58eb 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c -@@ -1029,7 +1029,7 @@ static int mpegts_push_data(MpegTSFilter *filter, +@@ -1030,7 +1030,7 @@ static int mpegts_push_data(MpegTSFilter *filter, goto skip; /* stream not present in PMT */ @@ -448,10 +448,10 @@ index 3f6c9e1..8112d89 100644 goto skip; -From 3132f9576db57c6773cb156a450a65ad185a282f Mon Sep 17 00:00:00 2001 +From 37ab1b368a42dcce9acc229689e063a866df90cb Mon Sep 17 00:00:00 2001 From: marc Date: Mon, 18 Feb 2013 17:18:18 +0000 -Subject: [PATCH 11/12] dxva-h264 Fix dxva playback of streams that don't start +Subject: [PATCH 11/13] dxva-h264 Fix dxva playback of streams that don't start with an I-Frame (adjusted to 2.7) --- @@ -506,7 +506,7 @@ index 7356288..907ee5e 100644 int sei_buffering_period_present; ///< Buffering period SEI flag int initial_cpb_removal_delay[32]; ///< Initial timestamps for CPBs diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c -index a346ccb..17e693f 100644 +index 9642dc5..cd9b73a 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1043,6 +1043,7 @@ static int h264_slice_header_init(H264Context *h) @@ -518,10 +518,10 @@ index a346ccb..17e693f 100644 init_scan_tables(h); ret = ff_h264_alloc_tables(h); -From 89edc04503a9c8512c464f70d1def6a0a009e051 Mon Sep 17 00:00:00 2001 +From 20ee469d2beb6a2963f53adc780eb7e3c2adcdfb Mon Sep 17 00:00:00 2001 From: wsnipex Date: Mon, 16 Feb 2015 09:58:28 +0100 -Subject: [PATCH 12/12] only check for a git rev if the src tree is in a git +Subject: [PATCH 12/13] only check for a git rev if the src tree is in a git repo fixes the version string when building from the kodi depends src tree @@ -583,3 +583,31 @@ index f9754eb..cc23f80 100755 fi # no revision number found + +From 24687d508d112358b515ce927b5e16b0369dab2f Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Sun, 15 Nov 2015 13:58:50 +0100 +Subject: [PATCH 13/13] avformat/utils: estimate_timings_from_pts - increase + retry counter, fixes invalid duration for ts files with hevc codec + +Fixes a mpegts file with hevc that fails estimating duration. Increasing number of +retries fixes the issue. + +Signed-off-by: Michael Niedermayer +--- + libavformat/utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavformat/utils.c b/libavformat/utils.c +index 966f4d2..3f26633 100644 +--- a/libavformat/utils.c ++++ b/libavformat/utils.c +@@ -2453,7 +2453,7 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic) + } + + #define DURATION_MAX_READ_SIZE 250000LL +-#define DURATION_MAX_RETRY 4 ++#define DURATION_MAX_RETRY 6 + + static void av_estimate_timings_from_pts2(AVFormatContext *ic, int64_t old_offset) + {