do not close pat filter so further pmt can be parsed.
Fix issue #1294.
Originally committed as revision 19530 to svn://svn.ffmpeg.org/ffmpeg/trunk
p += program_info_length;
if (p >= p_end)
return;
p += program_info_length;
if (p >= p_end)
return;
+
+ // stop parsing after pmt, we found header
+ if (!ts->stream->nb_streams)
+ ts->stop_parse = 1;
+
for(;;) {
st = 0;
stream_type = get8(&p, p_end);
for(;;) {
st = 0;
stream_type = get8(&p, p_end);
p = desc_list_end;
}
/* all parameters are there */
p = desc_list_end;
}
/* all parameters are there */
mpegts_close_filter(ts, filter);
}
mpegts_close_filter(ts, filter);
}
/* NIT info */
} else {
av_new_program(ts->stream, sid);
/* NIT info */
} else {
av_new_program(ts->stream, sid);
mpegts_open_section_filter(ts, pmt_pid, pmt_cb, ts, 1);
add_pat_entry(ts, sid);
add_pid_to_pmt(ts, sid, 0); //add pat pid to program
add_pid_to_pmt(ts, sid, pmt_pid);
}
}
mpegts_open_section_filter(ts, pmt_pid, pmt_cb, ts, 1);
add_pat_entry(ts, sid);
add_pid_to_pmt(ts, sid, 0); //add pat pid to program
add_pid_to_pmt(ts, sid, pmt_pid);
}
}
- /* not found */
- ts->stop_parse++;
-
- mpegts_close_filter(ts, filter);
}
static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len)
}
static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len)