MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / parse_section_header

Function parse_section_header

libavformat/mpegts.c:458–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458static int parse_section_header(SectionHeader *h,
459 const uint8_t **pp, const uint8_t *p_end)
460{
461 int val;
462
463 val = get8(pp, p_end);
464 if (val < 0)
465 return -1;
466 h->tid = val;
467 *pp += 2;
468 val = get16(pp, p_end);
469 if (val < 0)
470 return -1;
471 h->id = val;
472 val = get8(pp, p_end);
473 if (val < 0)
474 return -1;
475 h->version = (val >> 1) & 0x1f;
476 val = get8(pp, p_end);
477 if (val < 0)
478 return -1;
479 h->sec_num = val;
480 val = get8(pp, p_end);
481 if (val < 0)
482 return -1;
483 h->last_sec_num = val;
484 return 0;
485}
486
487typedef struct {
488 uint32_t stream_type;

Callers 3

pmt_cbFunction · 0.85
pat_cbFunction · 0.85
sdt_cbFunction · 0.85

Calls 2

get8Function · 0.85
get16Function · 0.85

Tested by

no test coverage detected