Merge commit '82de8d71118f4eafd6a43e9ea9169bd411793798'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 29 Apr 2015 02:24:06 +0000 (04:24 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 29 Apr 2015 02:24:06 +0000 (04:24 +0200)
* commit '82de8d71118f4eafd6a43e9ea9169bd411793798':
  mpegts: Update the PSI/SI table only if the version change

Conflicts:
libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/mpegts.c

@@@ -1806,9 -1534,12 +1814,12 @@@ static void pmt_cb(MpegTSFilter *filter
      p = section;
      if (parse_section_header(h, &p, p_end) < 0)
          return;
+     if (h->version == tssf->last_ver)
+         return;
+     tssf->last_ver = h->version;
  
 -    av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x sec_num=%d/%d\n",
 -            h->id, h->sec_num, h->last_sec_num);
 +    av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x sec_num=%d/%d version=%d\n",
 +            h->id, h->sec_num, h->last_sec_num, h->version);
  
      if (h->tid != PMT_TID)
          return;
@@@ -1969,10 -1682,9 +1981,13 @@@ static void pat_cb(MpegTSFilter *filter
          return;
      if (h->tid != PAT_TID)
          return;
 +    if (ts->skip_changes)
 +        return;
 +
+     if (h->version == tssf->last_ver)
+         return;
+     tssf->last_ver = h->version;
 +    ts->stream->ts_id = h->id;
  
      clear_programs(ts);
      for (;;) {
@@@ -2041,8 -1730,10 +2057,12 @@@ static void sdt_cb(MpegTSFilter *filter
          return;
      if (h->tid != SDT_TID)
          return;
 +    if (ts->skip_changes)
 +        return;
+     if (h->version == tssf->last_ver)
+         return;
+     tssf->last_ver = h->version;
      onid = get16(&p, p_end);
      if (onid < 0)
          return;