Commit 9b46c9c5 authored by heydowns's avatar heydowns

When new streams are detected, look for old filters and close them out.

This avoids crashes seen when legitimate streams are found on PID 0x11 instead
of DVB SDT.
Fixes regression detailed in Roundup issue 138.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11050 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8822faf8
...@@ -588,11 +588,11 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len ...@@ -588,11 +588,11 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
case STREAM_TYPE_AUDIO_AC3: case STREAM_TYPE_AUDIO_AC3:
case STREAM_TYPE_AUDIO_DTS: case STREAM_TYPE_AUDIO_DTS:
case STREAM_TYPE_SUBTITLE_DVB: case STREAM_TYPE_SUBTITLE_DVB:
if(ts->pids[pid]){ if(ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES){
assert(ts->pids[pid]->type == MPEGTS_PES);
pes= ts->pids[pid]->u.pes_filter.opaque; pes= ts->pids[pid]->u.pes_filter.opaque;
st= pes->st; st= pes->st;
}else{ }else{
if (ts->pids[pid]) mpegts_close_filter(ts, ts->pids[pid]); //wrongly added sdt filter probably
pes = add_pes_stream(ts, pid, pcr_pid, stream_type); pes = add_pes_stream(ts, pid, pcr_pid, stream_type);
if (pes) if (pes)
st = new_pes_av_stream(pes, 0); st = new_pes_av_stream(pes, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment