buildroot/package/ffmpeg/0006-Don-t-reparse-PMT-unless-it-s-version-has-changed.patch
Thomas Petazzoni 2c2fd3c257 package/ffmpeg: Add Kodi patchset
In the past xbmc delivered its own ffmpeg source code with specific patches to
address bugs found during the use of xbmc. For Helix the ffmpeg source code was
removed, Helix uses a vanilla ffmpeg source tarball and applies this patchset
on top of it.

Downloaded from
https://github.com/xbmc/FFmpeg/compare/FFmpeg:release/2.5...release/2.5-xbmc.patch

[Thomas: use individual patches instead.]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-12-27 19:58:29 +01:00

49 lines
1.5 KiB
Diff

From db98fbe37f2f7175ff03b8d582e940518ddf3642 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Sun, 18 Sep 2011 19:17:23 +0200
Subject: [PATCH 06/13] Don't reparse PMT unless it's version has changed
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavformat/mpegts.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 9f85aed..25007a6 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -88,6 +88,7 @@ struct MpegTSFilter {
int es_id;
int last_cc; /* last cc code (-1 if first packet) */
int64_t last_pcr;
+ int last_version; /* last version of data on this pid */
enum MpegTSFilterType type;
union {
MpegTSPESFilter pes_filter;
@@ -450,6 +451,7 @@ static MpegTSFilter *mpegts_open_filter(MpegTSContext *ts, unsigned int pid,
filter->es_id = -1;
filter->last_cc = -1;
filter->last_pcr= -1;
+ filter->last_version = -1;
return filter;
}
@@ -1972,6 +1974,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
return;
if (!h->current)
return;
+ if (h->version == filter->last_version)
+ return;
+ filter->last_version = h->version;
+ av_dlog(ts->stream, "version=%d\n", filter->last_version);
ts->stream->ts_id = h->id;
--
2.1.0