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