diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index c2e3c8c..49c6802 100644
|
a
|
b
|
struct MpegTSContext { |
| 119 | 119 | /******************************************/ |
| 120 | 120 | /* private mpegts data */ |
| 121 | 121 | /* scan context */ |
| | 122 | unsigned int pat_version; |
| 122 | 123 | /** structure to keep track of Program->pids mapping */ |
| 123 | 124 | unsigned int nb_prg; |
| 124 | 125 | struct Program *prg; |
| … |
… |
static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len |
| 1559 | 1560 | return; |
| 1560 | 1561 | if (h->tid != PAT_TID) |
| 1561 | 1562 | return; |
| | 1563 | if (h->version == ts->pat_version) |
| | 1564 | return; |
| 1562 | 1565 | |
| 1563 | 1566 | ts->stream->ts_id = h->id; |
| | 1567 | ts->pat_version = h->version; |
| 1564 | 1568 | |
| 1565 | 1569 | clear_programs(ts); |
| 1566 | 1570 | for(;;) { |
| … |
… |
static int mpegts_read_header(AVFormatContext *s) |
| 1933 | 1937 | } |
| 1934 | 1938 | ts->stream = s; |
| 1935 | 1939 | ts->auto_guess = 0; |
| | 1940 | ts->pat_version = 32; // use an impossible value |
| 1936 | 1941 | |
| 1937 | 1942 | if (s->iformat == &ff_mpegts_demuxer) { |
| 1938 | 1943 | /* normal demux */ |
| … |
… |
MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s) |
| 2173 | 2178 | ts->raw_packet_size = TS_PACKET_SIZE; |
| 2174 | 2179 | ts->stream = s; |
| 2175 | 2180 | ts->auto_guess = 1; |
| | 2181 | ts->pat_version = 32; // use an impossible value |
| 2176 | 2182 | mpegts_open_section_filter(ts, SDT_PID, sdt_cb, ts, 1); |
| 2177 | 2183 | mpegts_open_section_filter(ts, PAT_PID, pat_cb, ts, 1); |
| 2178 | 2184 | |