# HG changeset patch # User heydowns # Date 1195269283 0 # Node ID 5e808c3a55a81379cab1e451f2b94c625d47ee75 # Parent 034925441d678de43d33a24d25ebb22f07a6b85a 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. diff -r 034925441d67 -r 5e808c3a55a8 mpegts.c --- a/mpegts.c Fri Nov 16 13:13:53 2007 +0000 +++ b/mpegts.c Sat Nov 17 03:14:43 2007 +0000 @@ -588,11 +588,11 @@ case STREAM_TYPE_AUDIO_AC3: case STREAM_TYPE_AUDIO_DTS: case STREAM_TYPE_SUBTITLE_DVB: - if(ts->pids[pid]){ - assert(ts->pids[pid]->type == MPEGTS_PES); + if(ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES){ pes= ts->pids[pid]->u.pes_filter.opaque; st= pes->st; }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); if (pes) st = new_pes_av_stream(pes, 0);