diff options
author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-07-18 22:36:15 +0300 |
---|---|---|
committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-07-18 22:36:15 +0300 |
commit | c59f362c07750c0497973b47ee96a6ef632cd533 (patch) | |
tree | f012375583d16419584c7a49adaafefa465142a2 | |
parent | 0642ef94edb64507d80071803908a2c318052e32 (diff) | |
download | xine-lib-c59f362c07750c0497973b47ee96a6ef632cd533.tar.gz xine-lib-c59f362c07750c0497973b47ee96a6ef632cd533.tar.bz2 |
Fixed writing outside of buffer when there are more than MAX_PIDS scrambled pids.
-rw-r--r-- | src/demuxers/demux_ts.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 4affa3b2c..52b07a437 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -1917,8 +1917,10 @@ static void demux_ts_parse_packet (demux_ts_t*this) { for (i=0; i < this->scrambled_npids; i++) { if (this->scrambled_pids[i] == pid) return; } - this->scrambled_pids[this->scrambled_npids] = pid; - this->scrambled_npids++; + if (this->scrambled_npids < MAX_PIDS) { + this->scrambled_pids[this->scrambled_npids] = pid; + this->scrambled_npids++; + } xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: PID 0x%.4x is scrambled!\n", pid); return; |