ligzy / tstools

Automatically exported from code.google.com/p/tstools
0 stars 0 forks source link

Not finding PMT PID #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. playing a MPTS with other tables on the PMT PID 
2. type tsplay and it gets a PMT PID of 0x1fff which is invalid
3. na

What is the expected output? What do you see instead?
The PCR pid is not found so the video does not stream out

What version of the product are you using? On what operating system?
1.11

Please provide any additional information below.
Adding a check for the PMT table as the first byte of the PAT_data and 
discarding the file fixes this issue
before extract_pmt in find_PCR_PID in tsplay.c add this:

// We have seen MPTS with multiple tables in the PMT PID, so we know a real PMT 
table always starts with a table ID of 2 
      // so lets check and discard if its not a true PMT

      if (pmt_data[0] != 2) //its not a PMT table so continue looking Oh and free the packet
      {
         printf(" PMT does not have type 2 table so discard and try again\n");      
         if(pmt_data) free(pmt_data);
         pmt_data = NULL; pmt_data_len = 0; pmt_data_used = 0;
         continue;
      }

I've attached the tsplay.c

Original issue reported on code.google.com by andrewis...@googlemail.com on 31 Dec 2014 at 1:49

Attachments:

GoogleCodeExporter commented 9 years ago
Whoops added some other code to the file which should not be there and added a 
bug...
Attached is just the fix

Original comment by andrewis...@googlemail.com on 31 Dec 2014 at 2:41

Attachments: