651 if (
avio_seek(pb, last_pos + 1, SEEK_SET) < 0)
700 int max_size, uint64_t *number)
713 "Read error at pos. %"PRIu64
" (0x%"PRIx64
")\n",
722 if (read > max_size) {
725 "Invalid EBML number size tag 0x%02x at pos %"PRIu64
" (0x%"PRIx64
")\n",
733 total = (total << 8) |
avio_r8(pb);
749 if (res > 0 && *number + 1 == 1ULL << (7 * res))
750 *number = 0xffffffffffffffULL;
768 *num = (*num << 8) |
avio_r8(pb);
791 *num = (*num << 8) |
avio_r8(pb);
908 *num = unum - ((1LL << (7 * res - 1)) - 1);
917 uint32_t
id,
void *
data)
920 for (i = 0; syntax[i].
id; i++)
921 if (
id == syntax[i].
id)
953 for (i = 0; syntax[i].
id; i++)
954 switch (syntax[i].
type) {
956 *(uint64_t *) ((
char *) data + syntax[i].
data_offset) = syntax[i].def.
u;
959 *(
double *) ((
char *) data + syntax[i].data_offset) = syntax[i].
def.
f;
964 if (syntax[i].def.
s) {
993 uint32_t
id = syntax->
id;
1004 list->
elem = newelem;
1014 if (max_lengths[syntax->
type] && length > max_lengths[syntax->
type]) {
1016 "Invalid length 0x%"PRIx64
" > 0x%"PRIx64
" for syntax element %i\n",
1017 length, max_lengths[syntax->
type], syntax->
type);
1022 switch (syntax->
type) {
1064 for (i = 0; syntax[i].
id; i++) {
1065 void *data_off = (
char *) data + syntax[i].data_offset;
1066 switch (syntax[i].
type) {
1075 if (syntax[i].list_elem_size) {
1077 char *ptr = list->
elem;
1078 for (j = 0; j < list->
nb_elem;
1096 int len_mask = 0x80,
size = 1,
n = 1, i;
1104 while (
size <= 8 && !(total & len_mask)) {
1110 total &= (len_mask - 1);
1112 total = (total << 8) | p->
buf[4 +
n++];
1124 if (total < probelen)
1126 for (
n = 4 +
size;
n <= 4 +
size + total - probelen;
n++)
1142 if (tracks[i].num == num)
1154 int isize = *buf_size;
1157 int pkt_size = isize;
1161 if (pkt_size >= 10000000
U)
1164 switch (encodings[0].compression.algo) {
1170 if (header_size && !header) {
1178 pkt_size = isize + header_size;
1183 memcpy(pkt_data, header, header_size);
1184 memcpy(pkt_data + header_size, data, isize);
1190 olen = pkt_size *= 3;
1196 pkt_data = newpktdata;
1209 z_stream zstream = { 0 };
1210 if (inflateInit(&zstream) != Z_OK)
1212 zstream.next_in =
data;
1213 zstream.avail_in = isize;
1218 inflateEnd(&zstream);
1221 pkt_data = newpktdata;
1222 zstream.avail_out = pkt_size - zstream.total_out;
1223 zstream.next_out = pkt_data + zstream.total_out;
1225 result = inflate(&zstream, Z_NO_FLUSH);
1227 result = Z_MEM_ERROR;
1228 }
while (result == Z_OK && pkt_size < 10000000);
1229 pkt_size = zstream.total_out;
1230 inflateEnd(&zstream);
1231 if (result != Z_STREAM_END) {
1232 if (result == Z_MEM_ERROR)
1244 bz_stream bzstream = { 0 };
1245 if (BZ2_bzDecompressInit(&bzstream, 0, 0) != BZ_OK)
1247 bzstream.next_in =
data;
1248 bzstream.avail_in = isize;
1253 BZ2_bzDecompressEnd(&bzstream);
1256 pkt_data = newpktdata;
1257 bzstream.avail_out = pkt_size - bzstream.total_out_lo32;
1258 bzstream.next_out = pkt_data + bzstream.total_out_lo32;
1260 result = BZ2_bzDecompress(&bzstream);
1262 result = BZ_MEM_ERROR;
1263 }
while (result == BZ_OK && pkt_size < 10000000);
1264 pkt_size = bzstream.total_out_lo32;
1265 BZ2_bzDecompressEnd(&bzstream);
1266 if (result != BZ_STREAM_END) {
1267 if (result == BZ_MEM_ERROR)
1281 *buf_size = pkt_size;
1294 char *layer, *ptr = pkt->
data, *
end = ptr + pkt->
size;
1296 for (; *ptr !=
',' && ptr <
end - 1; ptr++)
1301 for (; *ptr !=
',' && ptr < end - 1; ptr++)
1304 int64_t end_pts = pkt->
pts + display_duration;
1306 int ec = matroska->
time_scale * end_pts / 10000000;
1307 int sh, sm, ss, eh, em, es,
len;
1325 "Dialogue: %s,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,%s\r\n",
1326 layer, sh, sm, ss, sc, eh, em, es, ec, ptr);
1355 for (i = 0; i < list->
nb_elem; i++) {
1356 const char *lang = tags[i].
lang &&
1357 strcmp(tags[i].lang,
"und") ? tags[i].
lang : NULL;
1359 if (!tags[i].
name) {
1364 snprintf(key,
sizeof(key),
"%s/%s", prefix, tags[i].name);
1367 if (tags[i].def || !lang) {
1369 if (tags[i].sub.nb_elem)
1376 if (tags[i].sub.nb_elem)
1390 if (tags[i].target.attachuid) {
1393 if (attachment[j].uid == tags[i].target.attachuid &&
1396 &attachment[j].stream->metadata, NULL);
1397 }
else if (tags[i].target.chapteruid) {
1400 if (chapter[j].uid == tags[i].target.chapteruid &&
1403 &chapter[j].chapter->metadata, NULL);
1404 }
else if (tags[i].target.trackuid) {
1407 if (track[j].uid == tags[i].target.trackuid && track[j].
stream)
1409 &track[j].stream->metadata, NULL);
1421 uint32_t level_up = matroska->
level_up;
1429 if (idx >= seekhead_list->
nb_elem ||
1441 "Max EBML element depth (%d) reached, "
1446 level.
length = (uint64_t) -1;
1451 ret =
ebml_parse(matroska, matroska_segment, matroska);
1456 if (length == (uint64_t) -1)
1480 for (i = 0; i < seekhead_list->
nb_elem; i++) {
1482 if (seekhead[i].pos <= before_pos)
1503 int index_scale = 1;
1506 index_list = &matroska->
index;
1507 index = index_list->
elem;
1513 for (i = 0; i < index_list->
nb_elem; i++) {
1516 for (j = 0; j < pos_list->
nb_elem; j++) {
1519 if (track && track->stream)
1522 index[i].
time / index_scale, 0, 0,
1533 for (i = 0; i < seekhead_list->
nb_elem; i++)
1545 static const char *
const aac_profiles[] = {
"MAIN",
"LC",
"SSR" };
1548 for (profile = 0; profile <
FF_ARRAY_ELEMS(aac_profiles); profile++)
1549 if (strstr(codec_id, aac_profiles[profile]))
1568 time_t creation_time = date_utc / 1000000000 + 978307200;
1569 struct tm *ptm = gmtime(&creation_time);
1571 strftime(buffer,
sizeof(buffer),
"%Y-%m-%d %H:%M:%S", ptm);
1572 av_dict_set(metadata,
"creation_time", buffer, 0);
1596 int block_last, block_type, block_size;
1602 if (block_size > size)
1611 chmask =
av_dict_get(dict,
"WAVEFORMATEXTENSIBLE_CHANNEL_MASK", NULL, 0);
1613 uint64_t
mask = strtol(chmask->
value, NULL, 0);
1614 if (!mask || mask & ~0x3ffffULL) {
1616 "Invalid value of WAVEFORMATEXTENSIBLE_CHANNEL_MASK\n");
1644 int extradata_size = 0;
1645 int extradata_offset = 0;
1646 uint32_t fourcc = 0;
1648 char* key_id_base64 = NULL;
1657 "Unknown or unsupported track type %"PRIu64
"\n",
1677 if (encodings_list->
nb_elem > 1) {
1679 "Multiple combined encodings not supported");
1680 }
else if (encodings_list->
nb_elem == 1) {
1681 if (encodings[0].
type) {
1682 if (encodings[0].encryption.key_id.size > 0) {
1685 const int b64_size =
AV_BASE64_SIZE(encodings[0].encryption.key_id.size);
1687 if (key_id_base64 == NULL)
1691 encodings[0].encryption.key_id.data,
1694 encodings[0].
scope = 0;
1696 "Unsupported encoding type");
1709 encodings[0].
scope = 0;
1711 "Unsupported encoding type");
1721 "Failed to decode codec private data\n");
1743 if (key_id_base64) {
1749 if (!strcmp(track->
codec_id,
"V_MS/VFW/FOURCC") &&
1760 extradata_offset = 40;
1761 }
else if (!strcmp(track->
codec_id,
"A_MS/ACM") &&
1767 0, NULL, NULL, NULL, NULL);
1773 }
else if (!strcmp(track->
codec_id,
"A_QUICKTIME")
1782 }
else if (!strcmp(track->
codec_id,
"V_QUICKTIME") &&
1823 extradata =
av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE);
1824 if (extradata == NULL)
1826 extradata[0] = (profile << 3) | ((sri & 0x0E) >> 1);
1827 extradata[1] = ((sri & 0x01) << 7) | (track->
audio.
channels << 3);
1828 if (strstr(track->
codec_id,
"SBR")) {
1830 extradata[2] = 0x56;
1831 extradata[3] = 0xE5;
1832 extradata[4] = 0x80 | (sri << 3);
1842 FF_INPUT_BUFFER_PADDING_SIZE);
1843 if (extradata == NULL)
1845 AV_WB32(extradata, extradata_size);
1846 memcpy(&extradata[4],
"alac", 4);
1851 extradata_size = 30;
1852 extradata =
av_mallocz(extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
1853 if (extradata == NULL)
1856 NULL, NULL, NULL, NULL);
1871 extradata_offset = 26;
1884 0, NULL, NULL, NULL, NULL);
1907 static const int sipr_bit_rate[4] = { 6504, 8496, 5000, 16000 };
1912 extradata_offset = 78;
1925 "Unknown/unsupported AVCodecID %s.\n", track->
codec_id);
1930 1000 * 1000 * 1000);
1939 if (strcmp(track->language,
"und"))
1943 if (track->flag_default)
1945 if (track->flag_forced)
1952 }
else if (track->codec_priv.data && track->codec_priv.size > 0) {
1956 track->codec_priv.data + extradata_offset,
1957 track->codec_priv.size);
1973 st->
codec->
width * track->video.display_height,
1978 if (track->default_duration) {
1980 1000000000, track->default_duration, 30000);
1981 #if FF_API_R_FRAME_RATE
1992 if (track->video.alpha_mode)
1996 for (j=0; j < track->operation.combine_planes.nb_elem; j++) {
2000 snprintf(buf,
sizeof(buf),
"%s_%d",
2003 if (planes[j].uid == tracks[k].uid) {
2005 "stereo_mode", buf, 0);
2017 if (track->codec_delay > 0) {
2022 if (track->seek_preroll > 0) {
2031 if (!strcmp(track->codec_id,
"D_WEBVTT/CAPTIONS")) {
2033 }
else if (!strcmp(track->codec_id,
"D_WEBVTT/DESCRIPTIONS")) {
2035 }
else if (!strcmp(track->codec_id,
"D_WEBVTT/METADATA")) {
2060 uint64_t max_start = 0;
2068 if (
ebml_parse(matroska, ebml_syntax, &ebml) ||
2070 ebml.
max_size >
sizeof(uint64_t) ||
2075 "EBML header using unsupported features\n"
2076 "(EBML version %"PRIu64
", doctype %s, doc version %"PRIu64
")\n",
2082 "EBML header using unsupported features\n"
2083 "(EBML version %"PRIu64
", doctype %s, doc version %"PRIu64
")\n",
2100 res =
ebml_parse(matroska, matroska_segments, matroska);
2107 res =
ebml_parse(matroska, matroska_segment, matroska);
2126 attachments = attachments_list->
elem;
2127 for (j = 0; j < attachments_list->
nb_elem; j++) {
2128 if (!(attachments[j].filename && attachments[j].mime &&
2129 attachments[j].bin.data && attachments[j].
bin.
size > 0)) {
2151 attachments[j].
stream = st;
2155 chapters = chapters_list->
elem;
2156 for (i = 0; i < chapters_list->
nb_elem; i++)
2158 (max_start == 0 || chapters[i].
start > max_start)) {
2162 chapters[i].
start, chapters[i].
end,
2165 "title", chapters[i].
title, 0);
2166 max_start = chapters[i].
start;
2194 matroska->
packets = newpackets;
2224 int *buf_size,
int type,
2225 uint32_t **lace_buf,
int *laces)
2227 int res = 0,
n,
size = *buf_size;
2229 uint32_t *lace_size;
2237 *lace_buf[0] =
size;
2245 lace_size =
av_mallocz(*laces *
sizeof(
int));
2254 for (
n = 0; res == 0 &&
n < *laces - 1;
n++) {
2256 if (size <= total) {
2262 lace_size[
n] +=
temp;
2269 if (size <= total) {
2274 lace_size[
n] = size - total;
2279 if (size % (*laces)) {
2283 for (
n = 0;
n < *laces;
n++)
2284 lace_size[
n] = size / *laces;
2292 if (n < 0 || num > INT_MAX) {
2294 "EBML block data error\n");
2300 total = lace_size[0] = num;
2301 for (
n = 1; res == 0 &&
n < *laces - 1;
n++) {
2305 if (r < 0 || lace_size[
n - 1] + snum > (uint64_t)INT_MAX) {
2307 "EBML block data error\n");
2313 lace_size[
n] = lace_size[
n - 1] + snum;
2314 total += lace_size[
n];
2316 if (size <= total) {
2320 lace_size[*laces - 1] = size - total;
2326 *lace_buf = lace_size;
2349 if (size < cfs * h / 2) {
2351 "Corrupt int4 RM-style audio packet size\n");
2354 for (x = 0; x < h / 2; x++)
2355 memcpy(track->
audio.
buf + x * 2 * w + y * cfs,
2356 data + x * cfs, cfs);
2360 "Corrupt sipr RM-style audio packet size\n");
2363 memcpy(track->
audio.
buf + y * w, data, w);
2365 if (size < sps * w / sps || h<=0 || w%sps) {
2367 "Corrupt generic RM-style audio packet size\n");
2370 for (x = 0; x < w / sps; x++)
2372 sps * (h * x + ((h + 1) / 2) * (y & 1) + (y >> 1)),
2373 data + x * sps, sps);
2414 if (srclen < 12 || track->stream->codec->extradata_size < 2)
2423 while (srclen >= 8) {
2429 uint32_t crc =
AV_RL32(src + 4);
2433 multiblock = (flags & 0x1800) != 0x1800;
2445 if (blocksize > srclen) {
2450 tmp =
av_realloc(dst, dstlen + blocksize + 32);
2456 dstlen += blocksize + 32;
2459 AV_WL32(dst + offset + 4, blocksize + 24);
2460 AV_WL16(dst + offset + 8, ver);
2461 AV_WL16(dst + offset + 10, 0);
2462 AV_WL32(dst + offset + 12, 0);
2463 AV_WL32(dst + offset + 16, 0);
2464 AV_WL32(dst + offset + 20, samples);
2465 AV_WL32(dst + offset + 24, flags);
2466 AV_WL32(dst + offset + 28, crc);
2467 memcpy(dst + offset + 32, src, blocksize);
2470 srclen -= blocksize;
2471 offset += blocksize + 32;
2494 int id_len, settings_len, text_len;
2502 q = data + data_len;
2507 if (*p ==
'\r' || *p ==
'\n') {
2516 if (p >= q || *p !=
'\n')
2523 if (*p ==
'\r' || *p ==
'\n') {
2524 settings_len = p - settings;
2532 if (p >= q || *p !=
'\n')
2538 while (text_len > 0) {
2539 const int len = text_len - 1;
2541 if (c !=
'\r' && c !=
'\n')
2556 memcpy(pkt->
data, text, text_len);
2566 memcpy(buf,
id, id_len);
2569 if (settings_len > 0) {
2577 memcpy(buf, settings, settings_len);
2584 pkt->
pts = timecode;
2601 uint64_t timecode, uint64_t lace_duration,
2603 uint8_t *additional, uint64_t additional_id,
int additional_size,
2604 int64_t discard_padding)
2611 if (encodings && !encodings->
type && encodings->
scope & 1) {
2622 "Error parsing a wavpack block.\n");
2625 if (pkt_data != data)
2644 bytestream_put_be32(&buf, pkt_size);
2645 bytestream_put_be32(&buf,
MKBETAG(
'i',
'c',
'p',
'f'));
2648 memcpy(pkt->
data + offset, pkt_data, pkt_size);
2650 if (pkt_data != data)
2656 if (additional_size > 0) {
2659 additional_size + 8);
2660 if (side_data == NULL) {
2665 AV_WB64(side_data, additional_id);
2666 memcpy(side_data + 8, additional, additional_size);
2669 if (discard_padding) {
2673 if (side_data == NULL) {
2685 pkt->
dts = timecode;
2687 pkt->
pts = timecode;
2702 lace_duration <= INT_MAX) {
2715 matroska_fix_ass_packet(matroska, pkt, lace_duration);
2722 matroska_merge_packets(matroska->
prev_pkt, pkt);
2735 if (pkt_data != data)
2741 int size, int64_t pos, uint64_t cluster_time,
2743 uint8_t *additional, uint64_t additional_id,
int additional_size,
2744 int64_t cluster_pos, int64_t discard_padding)
2751 uint32_t *lace_size = NULL;
2754 int trust_default_duration = 1;
2764 if (!track || !track->
stream) {
2766 "Invalid stream %"PRIu64
" or size %u\n", num, size);
2768 }
else if (size <= 3)
2779 if (is_keyframe == -1)
2782 if (cluster_time != (uint64_t) -1 &&
2783 (block_time >= 0 || cluster_time >= -block_time)) {
2784 timecode = cluster_time + block_time - track->
codec_delay;
2786 timecode < track->end_timecode)
2795 if (timecode < matroska->skip_to_timecode)
2806 &lace_size, &laces);
2815 trust_default_duration = 0;
2819 if (!block_duration && trust_default_duration)
2822 if (cluster_time != (uint64_t)-1 && (block_time >= 0 || cluster_time >= -block_time))
2826 for (n = 0; n < laces; n++) {
2827 int64_t lace_duration = block_duration*(n+1) / laces - block_duration*n / laces;
2829 if (lace_size[n] > size) {
2848 timecode, lace_duration,
2854 timecode, lace_duration, pos,
2855 !n ? is_keyframe : 0,
2856 additional, additional_id, additional_size,
2863 timecode = lace_duration ? timecode + lace_duration :
AV_NOPTS_VALUE;
2864 data += lace_size[
n];
2865 size -= lace_size[
n];
2879 matroska_cluster_incremental_parsing,
2894 matroska_clusters_incremental,
2899 matroska_cluster_incremental_parsing,
2907 blocks = blocks_list->
elem;
2911 if (blocks[i].bin.size > 0 && blocks[i].
bin.
data) {
2915 if (!blocks[i].non_simple)
2945 res =
ebml_parse(matroska, matroska_clusters, &cluster);
2946 blocks_list = &cluster.
blocks;
2947 blocks = blocks_list->
elem;
2948 for (i = 0; i < blocks_list->
nb_elem; i++)
2949 if (blocks[i].bin.size > 0 && blocks[i].
bin.
data) {
2954 is_keyframe, NULL, 0, 0, pos,
2977 int64_t timestamp,
int flags)
2982 int i,
index, index_sub, index_min;
3020 while (index_sub >= 0 &&
3022 tracks[i].stream->index_entries[index_sub].pos < st->
index_entries[index_min].
pos &&
3089 for (i = 1; i < nb_index_entries; i++) {
3090 if (index_entries[i - 1].timestamp * matroska->
time_scale <= ts &&
3098 if (i != nb_index_entries - 1) {
3114 int64_t cluster_pos, before_pos;
3119 if (index < 0)
return 0;
3123 int64_t cluster_id = 0, cluster_length = 0;
3129 if (cluster_id != 0xF43B675) {
3140 cluster_pos += cluster_length + 12;
3151 double min_buffer,
double*
buffer,
3155 double nano_seconds_per_second = 1000000000.0;
3156 double time_sec = time_ns / nano_seconds_per_second;
3158 int64_t time_to_search_ns = (int64_t)(search_sec * nano_seconds_per_second);
3159 int64_t end_time_ns = time_ns + time_to_search_ns;
3160 double sec_downloaded = 0.0;
3164 *sec_to_download = 0.0;
3168 int64_t cue_nano = desc_curr.
end_time_ns - time_ns;
3171 double timeToDownload = (cueBytes * 8.0) /
bps;
3173 sec_downloaded += (cue_nano / nano_seconds_per_second) - timeToDownload;
3174 *sec_to_download += timeToDownload;
3178 double desc_end_time_sec = desc_curr.
end_time_ns / nano_seconds_per_second;
3179 double percent_to_sub = search_sec / (desc_end_time_sec - time_sec);
3180 sec_downloaded = percent_to_sub * sec_downloaded;
3181 *sec_to_download = percent_to_sub * *sec_to_download;
3184 if ((sec_downloaded + *buffer) <= min_buffer) {
3195 double desc_sec = desc_ns / nano_seconds_per_second;
3196 double bits = (desc_bytes * 8.0);
3197 double time_to_download = bits /
bps;
3199 sec_downloaded += desc_sec - time_to_download;
3200 *sec_to_download += time_to_download;
3203 double desc_end_time_sec = desc_curr.
end_time_ns / nano_seconds_per_second;
3204 double percent_to_sub = search_sec / (desc_end_time_sec - time_sec);
3205 sec_downloaded = percent_to_sub * sec_downloaded;
3206 *sec_to_download = percent_to_sub * *sec_to_download;
3208 if ((sec_downloaded + *buffer) <= min_buffer)
3213 if ((sec_downloaded + *buffer) <= min_buffer) {
3220 *buffer = *buffer + sec_downloaded;
3235 double bandwidth = 0.0;
3239 int64_t prebuffer_ns = 1000000000;
3241 double nano_seconds_per_second = 1000000000.0;
3242 int64_t prebuffered_ns = time_ns + prebuffer_ns;
3243 double prebuffer_bytes = 0.0;
3244 int64_t temp_prebuffer_ns = prebuffer_ns;
3245 int64_t pre_bytes, pre_ns;
3246 double pre_sec, prebuffer, bits_per_second;
3269 pre_sec = pre_ns / nano_seconds_per_second;
3271 pre_bytes * ((temp_prebuffer_ns / nano_seconds_per_second) / pre_sec);
3273 prebuffer = prebuffer_ns / nano_seconds_per_second;
3276 bits_per_second = 0.0;
3280 double desc_sec = desc_ns / nano_seconds_per_second;
3281 double calc_bits_per_second = (desc_bytes * 8) / desc_sec;
3284 double percent = (desc_bytes - prebuffer_bytes) / desc_bytes;
3285 double mod_bits_per_second = calc_bits_per_second * percent;
3287 if (prebuffer < desc_sec) {
3293 int64_t
bps = (int64_t)(mod_bits_per_second) + 1;
3294 const double min_buffer = 0.0;
3295 double buffer = prebuffer;
3296 double sec_to_download = 0.0;
3299 min_buffer, &buffer, &sec_to_download,
3303 }
else if (rv == 0) {
3304 bits_per_second = (double)(bps);
3311 if (bandwidth < bits_per_second) bandwidth = bits_per_second;
3313 return (int64_t)bandwidth;
3322 int64_t cues_start, cues_end, before_pos, bandwidth;
3326 for (i = 0; i < seekhead_list->
nb_elem; i++)
3330 if (i >= seekhead_list->
nb_elem)
return -1;
3334 if (
avio_seek(matroska->
ctx->
pb, cues_start, SEEK_SET) == cues_start) {
3335 uint64_t cues_length = 0, cues_id = 0;
3338 cues_end = cues_start + cues_length + 11;
3347 if (!buf)
return AVERROR(ENOMEM);
3353 if (!buf)
return AVERROR(ENOMEM);
3359 if (bandwidth < 0)
return -1;
3361 if (!buf)
return AVERROR(ENOMEM);
3367 if (!buf)
return AVERROR(ENOMEM);
3374 if (!buf)
return -1;
3377 snprintf(buf, (i + 1) * 20 *
sizeof(
char),
3380 strncat(buf,
",",
sizeof(
char));
3401 if (!buf)
return AVERROR(ENOMEM);
3407 if (buf == NULL)
return -1;
3412 if (!buf)
return AVERROR(ENOMEM);
3419 if (!buf)
return AVERROR(ENOMEM);
3433 .
name =
"matroska,webm",
3444 .
name =
"webm_dash_manifest",