diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index c2e3c8c..49c6802 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -119,6 +119,7 @@ struct MpegTSContext {
     /******************************************/
     /* private mpegts data */
     /* scan context */
+    unsigned int pat_version;
     /** structure to keep track of Program->pids mapping     */
     unsigned int nb_prg;
     struct Program *prg;
@@ -1559,8 +1560,11 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
         return;
     if (h->tid != PAT_TID)
         return;
+    if (h->version == ts->pat_version)
+        return;
 
     ts->stream->ts_id = h->id;
+    ts->pat_version = h->version;
 
     clear_programs(ts);
     for(;;) {
@@ -1933,6 +1937,7 @@ static int mpegts_read_header(AVFormatContext *s)
     }
     ts->stream = s;
     ts->auto_guess = 0;
+    ts->pat_version = 32; // use an impossible value
 
     if (s->iformat == &ff_mpegts_demuxer) {
         /* normal demux */
@@ -2173,6 +2178,7 @@ MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s)
     ts->raw_packet_size = TS_PACKET_SIZE;
     ts->stream = s;
     ts->auto_guess = 1;
+    ts->pat_version = 32; // use an impossible value
     mpegts_open_section_filter(ts, SDT_PID, sdt_cb, ts, 1);
     mpegts_open_section_filter(ts, PAT_PID, pat_cb, ts, 1);
 
