From fce4e656ac01a7b0822f1efbae85cf6e50e8999e Mon Sep 17 00:00:00 2001 From: Simon Farnsworth Date: Mon, 16 Jun 2008 17:33:48 +0100 Subject: demux_ts: Always replace PIDs when we parse a PMT demux_ts currently assumes that PIDs for a service never change - BBC THREE (amongst others) breaks this assumption. A PMT shouldn't change unless PIDs change, so always reacquire PIDs whenever we parse a PMT; this should work fine in the case when the PIDs do not change, and pick up the new PIDs whenever a change happens --HG-- extra : transplant_source : e%AB%EB%E1%CF%D8%1C%15%5E%DE%09%E4%3Dd%AB%E3f%FD%E5%9E --- src/demuxers/demux_ts.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 80ad0acb1..67b2fbf2a 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -1239,6 +1239,15 @@ printf("Program Number is %i, looking for %i\n",program_number,this->program_num } } + /* + * Forget the current video, audio and subtitle PIDs; if the PMT has not + * changed, we'll pick them up again when we parse this PMT, while if the + * PMT has changed (e.g. an IPTV streamer that's just changed its source), + * we'll get new PIDs that we should follow. + */ + this->audio_tracks_count = 0; + this->videoPid = INVALID_PID; + this->spu_pid = INVALID_PID; /* * ES definitions start here...we are going to learn upto one video -- cgit v1.2.3