summaryrefslogtreecommitdiff
path: root/libavformat/mpegts.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-06-04 12:19:38 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-06-04 12:19:38 +0000
commit37dfd6333ddc2e9fd3522d66341ea55cf77f3148 (patch)
treeada893e781d3c5cf5324124e596cc6d34625a9b3 /libavformat/mpegts.c
parent657ced8cdbd747946bf4a3909dacafc95a9309f4 (diff)
do not perform SDT scan at the begin (this avoids a timeconsuming search for
optional info) instead fill SDT info in and update it as we stumble across it Originally committed as revision 9201 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 00cddf3eee..9593c20fcb 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -105,7 +105,6 @@ struct MpegTSContext {
/******************************************/
/* private mpegts data */
/* scan context */
- MpegTSFilter *sdt_filter;
/** number of PMTs in the last PAT seen */
int nb_services;
/** list of PMTs in the last PAT seen */
@@ -708,17 +707,12 @@ static void sdt_cb(void *opaque, const uint8_t *section, int section_len)
}
p = desc_list_end;
}
- ts->stop_parse = 1;
-
- /* remove filter */
- mpegts_close_filter(ts, ts->sdt_filter);
- ts->sdt_filter = NULL;
}
/* scan services in a transport stream by looking at the SDT */
static void mpegts_scan_sdt(MpegTSContext *ts)
{
- ts->sdt_filter = mpegts_open_section_filter(ts, SDT_PID,
+ mpegts_open_section_filter(ts, SDT_PID,
sdt_cb, ts, 1);
}
@@ -1218,18 +1212,7 @@ static int mpegts_read_header(AVFormatContext *s,
url_fseek(pb, pos, SEEK_SET);
mpegts_scan_sdt(ts);
- handle_packets(ts, s->probesize);
-
if (ts->nb_services <= 0) {
- /* no SDT found, we try to look at the PAT */
-
- /* First remove the SDT filters from each PID */
- int i;
- for (i=0; i < NB_PID_MAX; i++) {
- if (ts->pids[i])
- mpegts_close_filter(ts, ts->pids[i]);
- }
- url_fseek(pb, pos, SEEK_SET);
mpegts_scan_pat(ts);
handle_packets(ts, s->probesize);