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

Function is_common_init_section_exist

libavformat/dashdec.c:2014–2039  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2012}
2013
2014static int is_common_init_section_exist(struct representation **pls, int n_pls)
2015{
2016 struct fragment *first_init_section = pls[0]->init_section;
2017 char *url =NULL;
2018 int64_t url_offset = -1;
2019 int64_t size = -1;
2020 int i = 0;
2021
2022 if (first_init_section == NULL || n_pls == 0)
2023 return 0;
2024
2025 url = first_init_section->url;
2026 url_offset = first_init_section->url_offset;
2027 size = pls[0]->init_section->size;
2028 for (i=0;i<n_pls;i++) {
2029 if (!pls[i]->init_section)
2030 continue;
2031
2032 if (av_strcasecmp(pls[i]->init_section->url, url) ||
2033 pls[i]->init_section->url_offset != url_offset ||
2034 pls[i]->init_section->size != size) {
2035 return 0;
2036 }
2037 }
2038 return 1;
2039}
2040
2041static int copy_init_section(struct representation *rep_dest, struct representation *rep_src)
2042{

Callers 1

dash_read_headerFunction · 0.85

Calls 1

av_strcasecmpFunction · 0.85

Tested by

no test coverage detected