summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2009-09-10 11:13:59 +0000
committerphintuka <phintuka>2009-09-10 11:13:59 +0000
commit43c506ff60c92ec3a40f64e20efe9d48e4b13208 (patch)
treeadc1e09952638cd69ff515c6a3c658e78b82da79
parentb300cfccb9d8f4d76e96a81c7b92127675482b22 (diff)
downloadxineliboutput-43c506ff60c92ec3a40f64e20efe9d48e4b13208.tar.gz
xineliboutput-43c506ff60c92ec3a40f64e20efe9d48e4b13208.tar.bz2
Reset PMT buffer only when PMT pid changes.
Fixes collecting PMT packets when PMT spans over multiple TS packets and PAT is muxed to middle of PMT packets.
-rw-r--r--xine/BluRay/demux_ts.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/xine/BluRay/demux_ts.c b/xine/BluRay/demux_ts.c
index b9dce7df..79315004 100644
--- a/xine/BluRay/demux_ts.c
+++ b/xine/BluRay/demux_ts.c
@@ -678,14 +678,16 @@ static void demux_ts_parse_pat (demux_ts_t*this, unsigned char *original_pkt,
this->last_pmt_crc = 0;
this->videoPid = INVALID_PID;
this->spu_pid = INVALID_PID;
- }
- this->pmt_pid[program_count] = pmt_pid;
- if (this->pmt[program_count] != NULL) {
- free(this->pmt[program_count]);
- this->pmt[program_count] = NULL;
- this->pmt_write_ptr[program_count] = NULL;
+ this->pmt_pid[program_count] = pmt_pid;
+
+ if (this->pmt[program_count] != NULL) {
+ free(this->pmt[program_count]);
+ this->pmt[program_count] = NULL;
+ this->pmt_write_ptr[program_count] = NULL;
+ }
}
+
#ifdef TS_PAT_LOG
if (this->program_number[program_count] != INVALID_PROGRAM)
printf ("demux_ts: PAT acquired count=%d programNumber=0x%04x "