Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a/arib_std_b25.c Sun Oct 21 19:38:02 2012 +0900
- +++ b/arib_std_b25.c Mon Sep 08 06:47:52 2014 +0900
- @@ -1277,7 +1277,44 @@
- }
- extract_ts_header(&hdr, curr);
- -
- +
- + if(hdr.pid == 0x0000){
- + p = curr+4;
- + if(hdr.adaptation_field_control & 0x02){
- + p += (p[0]+1);
- + }
- + size = 188 - (p-curr);
- + if(size < 1){
- + goto NEXT;
- + }
- + if(prv->pat == NULL){
- + prv->pat = create_ts_section_parser();
- + if(prv->pat == NULL){
- + r = ARIB_STD_B25_ERROR_NO_ENOUGH_MEMORY;
- + goto LAST;
- + }
- + }
- + n = prv->pat->put(prv->pat, &hdr, p, size);
- + if(n < 0){
- + r = ARIB_STD_B25_ERROR_PAT_PARSE_FAILURE;
- + curr += unit;
- + goto LAST;
- + }
- + n = prv->pat->get_count(prv->pat);
- + if(n < 0){
- + r = ARIB_STD_B25_ERROR_PAT_PARSE_FAILURE;
- + curr += unit;
- + goto LAST;
- + }
- + if(n == 0){
- + goto NEXT;
- + }
- + r = proc_pat(prv);
- + curr += unit;
- + prv->sbuf.head = curr;
- + goto LAST;
- + }
- +
- if(prv->map[hdr.pid].type != PID_MAP_TYPE_PMT){
- goto NEXT;
- }
- @@ -1607,6 +1644,44 @@
- curr = p;
- }
- extract_ts_header(&hdr, curr);
- +
- + if(hdr.pid == 0x0000){
- + p = curr+4;
- + if(hdr.adaptation_field_control & 0x02){
- + p += (p[0]+1);
- + }
- + size = 188 - (p-curr);
- + if(size < 1){
- + goto NEXT;
- + }
- + if(prv->pat == NULL){
- + prv->pat = create_ts_section_parser();
- + if(prv->pat == NULL){
- + r = ARIB_STD_B25_ERROR_NO_ENOUGH_MEMORY;
- + goto LAST;
- + }
- + }
- + n = prv->pat->put(prv->pat, &hdr, p, size);
- + if(n < 0){
- + r = ARIB_STD_B25_ERROR_PAT_PARSE_FAILURE;
- + curr += unit;
- + goto LAST;
- + }
- + n = prv->pat->get_count(prv->pat);
- + if(n < 0){
- + r = ARIB_STD_B25_ERROR_PAT_PARSE_FAILURE;
- + curr += unit;
- + goto LAST;
- + }
- + if(n == 0){
- + goto NEXT;
- + }
- + r = proc_pat(prv);
- + curr += unit;
- + prv->sbuf.head = curr;
- + goto LAST;
- + }
- +
- if(prv->map[hdr.pid].type != PID_MAP_TYPE_ECM){
- goto NEXT;
- }
- @@ -2052,6 +2127,7 @@
- goto NEXT;
- }
- r = proc_pat(prv);
- + curr += unit;
- goto LAST;
- }
- @@ -2060,7 +2136,7 @@
- }
- LAST:
- - m = curr - prv->sbuf.head;
- + m = curr - prv->sbuf.pool;
- n = tail - curr;
- if( (n < 1024) || (m > (prv->sbuf.max/2) ) ){
- p = prv->sbuf.pool;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement