73 unsigned len,
const char *key)
77 short current, total = 0;
83 snprintf(buf,
sizeof(buf),
"%d", current);
85 snprintf(buf,
sizeof(buf),
"%d/%d", current, total);
93 unsigned len,
const char *key)
107 unsigned len,
const char *key)
116 unsigned len,
const char *key)
132 0x00C4,0x00C5,0x00C7,0x00C9,0x00D1,0x00D6,0x00DC,0x00E1,
133 0x00E0,0x00E2,0x00E4,0x00E3,0x00E5,0x00E7,0x00E9,0x00E8,
134 0x00EA,0x00EB,0x00ED,0x00EC,0x00EE,0x00EF,0x00F1,0x00F3,
135 0x00F2,0x00F4,0x00F6,0x00F5,0x00FA,0x00F9,0x00FB,0x00FC,
136 0x2020,0x00B0,0x00A2,0x00A3,0x00A7,0x2022,0x00B6,0x00DF,
137 0x00AE,0x00A9,0x2122,0x00B4,0x00A8,0x2260,0x00C6,0x00D8,
138 0x221E,0x00B1,0x2264,0x2265,0x00A5,0x00B5,0x2202,0x2211,
139 0x220F,0x03C0,0x222B,0x00AA,0x00BA,0x03A9,0x00E6,0x00F8,
140 0x00BF,0x00A1,0x00AC,0x221A,0x0192,0x2248,0x2206,0x00AB,
141 0x00BB,0x2026,0x00A0,0x00C0,0x00C3,0x00D5,0x0152,0x0153,
142 0x2013,0x2014,0x201C,0x201D,0x2018,0x2019,0x00F7,0x25CA,
143 0x00FF,0x0178,0x2044,0x20AC,0x2039,0x203A,0xFB01,0xFB02,
144 0x2021,0x00B7,0x201A,0x201E,0x2030,0x00C2,0x00CA,0x00C1,
145 0x00CB,0x00C8,0x00CD,0x00CE,0x00CF,0x00CC,0x00D3,0x00D4,
146 0xF8FF,0x00D2,0x00DA,0x00DB,0x00D9,0x0131,0x02C6,0x02DC,
147 0x00AF,0x02D8,0x02D9,0x02DA,0x00B8,0x02DD,0x02DB,0x02C7,
151 char *dst,
int dstlen)
154 char *
end = dst+dstlen-1;
157 for (i = 0; i <
len; i++) {
159 if (c < 0x80 && p < end)
221 char language[4] = { 0 };
222 char buf[200], place[100];
223 uint16_t langcode = 0;
224 double longitude, latitude, altitude;
225 const char *key =
"location";
227 if (len < 4 + 2 + 1 + 1 + 4 + 4 + 4) {
247 "loci too short (%u bytes left, need at least %d)\n", len, 12);
255 snprintf(buf,
sizeof(buf),
"%+08.4f%+09.4f", latitude, longitude);
260 if (*language && strcmp(language,
"und")) {
262 snprintf(key2,
sizeof(key2),
"%s-%s", key, language);
272 char key2[32], language[4] = {0};
274 const char *key =
NULL;
275 uint16_t langcode = 0;
276 uint32_t data_type = 0, str_size, str_size_alloc;
282 case MKTAG(
'@',
'P',
'R',
'M'): key =
"premiere_version"; raw = 1;
break;
283 case MKTAG(
'@',
'P',
'R',
'Q'): key =
"quicktime_version"; raw = 1;
break;
284 case MKTAG(
'X',
'M',
'P',
'_'):
285 if (c->
export_xmp) { key =
"xmp"; raw = 1; }
break;
286 case MKTAG(
'a',
'A',
'R',
'T'): key =
"album_artist";
break;
287 case MKTAG(
'a',
'k',
'I',
'D'): key =
"account_type";
289 case MKTAG(
'a',
'p',
'I',
'D'): key =
"account_id";
break;
290 case MKTAG(
'c',
'a',
't',
'g'): key =
"category";
break;
291 case MKTAG(
'c',
'p',
'i',
'l'): key =
"compilation";
293 case MKTAG(
'c',
'p',
'r',
't'): key =
"copyright";
break;
294 case MKTAG(
'd',
'e',
's',
'c'): key =
"description";
break;
295 case MKTAG(
'd',
'i',
's',
'k'): key =
"disc";
297 case MKTAG(
'e',
'g',
'i',
'd'): key =
"episode_uid";
299 case MKTAG(
'g',
'n',
'r',
'e'): key =
"genre";
301 case MKTAG(
'h',
'd',
'v',
'd'): key =
"hd_video";
303 case MKTAG(
'k',
'e',
'y',
'w'): key =
"keywords";
break;
304 case MKTAG(
'l',
'd',
'e',
's'): key =
"synopsis";
break;
305 case MKTAG(
'l',
'o',
'c',
'i'):
307 case MKTAG(
'p',
'c',
's',
't'): key =
"podcast";
309 case MKTAG(
'p',
'g',
'a',
'p'): key =
"gapless_playback";
311 case MKTAG(
'p',
'u',
'r',
'd'): key =
"purchase_date";
break;
312 case MKTAG(
'r',
't',
'n',
'g'): key =
"rating";
314 case MKTAG(
's',
'o',
'a',
'a'): key =
"sort_album_artist";
break;
315 case MKTAG(
's',
'o',
'a',
'l'): key =
"sort_album";
break;
316 case MKTAG(
's',
'o',
'a',
'r'): key =
"sort_artist";
break;
317 case MKTAG(
's',
'o',
'c',
'o'): key =
"sort_composer";
break;
318 case MKTAG(
's',
'o',
'n',
'm'): key =
"sort_name";
break;
319 case MKTAG(
's',
'o',
's',
'n'): key =
"sort_show";
break;
320 case MKTAG(
's',
't',
'i',
'k'): key =
"media_type";
322 case MKTAG(
't',
'r',
'k',
'n'): key =
"track";
324 case MKTAG(
't',
'v',
'e',
'n'): key =
"episode_id";
break;
325 case MKTAG(
't',
'v',
'e',
's'): key =
"episode_sort";
327 case MKTAG(
't',
'v',
'n',
'n'): key =
"network";
break;
328 case MKTAG(
't',
'v',
's',
'h'): key =
"show";
break;
329 case MKTAG(
't',
'v',
's',
'n'): key =
"season_number";
331 case MKTAG(0xa9,
'A',
'R',
'T'): key =
"artist";
break;
332 case MKTAG(0xa9,
'P',
'R',
'D'): key =
"producer";
break;
333 case MKTAG(0xa9,
'a',
'l',
'b'): key =
"album";
break;
334 case MKTAG(0xa9,
'a',
'u',
't'): key =
"artist";
break;
335 case MKTAG(0xa9,
'c',
'h',
'p'): key =
"chapter";
break;
336 case MKTAG(0xa9,
'c',
'm',
't'): key =
"comment";
break;
337 case MKTAG(0xa9,
'c',
'o',
'm'): key =
"composer";
break;
338 case MKTAG(0xa9,
'c',
'p',
'y'): key =
"copyright";
break;
339 case MKTAG(0xa9,
'd',
'a',
'y'): key =
"date";
break;
340 case MKTAG(0xa9,
'd',
'i',
'r'): key =
"director";
break;
341 case MKTAG(0xa9,
'd',
'i',
's'): key =
"disclaimer";
break;
342 case MKTAG(0xa9,
'e',
'd',
'1'): key =
"edit_date";
break;
343 case MKTAG(0xa9,
'e',
'n',
'c'): key =
"encoder";
break;
344 case MKTAG(0xa9,
'f',
'm',
't'): key =
"original_format";
break;
345 case MKTAG(0xa9,
'g',
'e',
'n'): key =
"genre";
break;
346 case MKTAG(0xa9,
'g',
'r',
'p'): key =
"grouping";
break;
347 case MKTAG(0xa9,
'h',
's',
't'): key =
"host_computer";
break;
348 case MKTAG(0xa9,
'i',
'n',
'f'): key =
"comment";
break;
349 case MKTAG(0xa9,
'l',
'y',
'r'): key =
"lyrics";
break;
350 case MKTAG(0xa9,
'm',
'a',
'k'): key =
"make";
break;
351 case MKTAG(0xa9,
'm',
'o',
'd'): key =
"model";
break;
352 case MKTAG(0xa9,
'n',
'a',
'm'): key =
"title";
break;
353 case MKTAG(0xa9,
'o',
'p',
'e'): key =
"original_artist";
break;
354 case MKTAG(0xa9,
'p',
'r',
'd'): key =
"producer";
break;
355 case MKTAG(0xa9,
'p',
'r',
'f'): key =
"performers";
break;
356 case MKTAG(0xa9,
'r',
'e',
'q'): key =
"playback_requirements";
break;
357 case MKTAG(0xa9,
's',
'r',
'c'): key =
"original_source";
break;
358 case MKTAG(0xa9,
's',
't',
'3'): key =
"subtitle";
break;
359 case MKTAG(0xa9,
's',
'w',
'r'): key =
"encoder";
break;
360 case MKTAG(0xa9,
't',
'o',
'o'): key =
"encoder";
break;
361 case MKTAG(0xa9,
't',
'r',
'k'): key =
"track";
break;
362 case MKTAG(0xa9,
'u',
'r',
'l'): key =
"URL";
break;
363 case MKTAG(0xa9,
'w',
'r',
'n'): key =
"warning";
break;
364 case MKTAG(0xa9,
'w',
'r',
't'): key =
"composer";
break;
365 case MKTAG(0xa9,
'x',
'y',
'z'): key =
"location";
break;
371 if (tag ==
MKTAG(
'd',
'a',
't',
'a') && data_size <= atom.
size) {
374 str_size = data_size - 16;
377 if (atom.
type ==
MKTAG(
'c',
'o',
'v',
'r')) {
385 if (index < c->meta_keys_count) {
389 "The index of 'data' is out of range: %d >= %d.\n",
396 if (str_size > atom.
size) {
406 str_size = atom.
size;
415 if (atom.
size < 0 || str_size >= INT_MAX/2)
420 num = (data_type >= 21 && data_type <= 23);
421 str_size_alloc = (num ? 512 : (raw ? str_size : str_size * 2)) + 1;
427 parse(c, pb, str_size, key);
429 if (!raw && (data_type == 3 || (data_type == 0 && (langcode < 0x400 || langcode == 0x7fff)))) {
431 }
else if (data_type == 21) {
435 else if (str_size == 2)
437 else if (str_size == 3)
439 else if (str_size == 4)
441 if (
snprintf(str, str_size_alloc,
"%d", val) >= str_size_alloc) {
443 "Failed to store the number (%d) in string.\n", val);
447 }
else if (data_type == 22) {
448 unsigned int val = 0;
451 else if (str_size == 2)
453 else if (str_size == 3)
455 else if (str_size == 4)
457 if (
snprintf(str, str_size_alloc,
"%u", val) >= str_size_alloc) {
459 "Failed to store the number (%u) in string.\n", val);
463 }
else if (data_type == 23 && str_size >= 4) {
465 if (
snprintf(str, str_size_alloc,
"%f", val) >= str_size_alloc) {
467 "Failed to store the float32 number (%f) in string.\n", val);
481 if (*language && strcmp(language,
"und")) {
482 snprintf(key2,
sizeof(key2),
"%s-%s", key, language);
485 if (!strcmp(key,
"encoder")) {
486 int major, minor, micro;
487 if (sscanf(str,
"HandBrake %d.%d.%d", &major, &minor, µ) == 3) {
494 key, str, (
char*)&atom.
type, str_size_alloc, atom.
size);
503 int i, nb_chapters, str_len,
version;
510 if ((atom.
size -= 5) < 0)
519 for (i = 0; i < nb_chapters; i++) {
526 if ((atom.
size -= 9+str_len) < 0)
538 #define MIN_DATA_ENTRY_BOX_SIZE 12
554 entries >= UINT_MAX /
sizeof(*sc->
drefs))
564 for (i = 0; i < entries; i++) {
576 if (dref->
type ==
MKTAG(
'a',
'l',
'i',
's') && size > 150) {
578 uint16_t volume_len,
len;
585 volume_len =
FFMIN(volume_len, 27);
589 dref->
volume[volume_len] = 0;
595 len =
FFMIN(len, 63);
612 for (type = 0; type != -1 &&
avio_tell(pb) < next; ) {
631 if (len > volume_len && !strncmp(dref->
path, dref->
volume, volume_len)) {
633 memmove(dref->
path, dref->
path+volume_len, len);
637 for (j = len - 1; j >= 0; j--) {
638 if (dref->
path[j] == 0)
643 for (j = 0; j <
len; j++)
644 if (dref->
path[j] ==
':' || dref->
path[j] == 0)
647 }
else if (type == 0) {
659 for (j = 0; j <
len; j++)
660 if (dref->
dir[j] ==
':')
697 if (type ==
MKTAG(
'm',
'd',
't',
'a')) {
705 if (type ==
MKTAG(
'v',
'i',
'd',
'e'))
707 else if (type ==
MKTAG(
's',
'o',
'u',
'n'))
709 else if (type ==
MKTAG(
'm',
'1',
'a',
' '))
711 else if ((type ==
MKTAG(
's',
'u',
'b',
'p')) || (type ==
MKTAG(
'c',
'l',
'c',
'p')))
718 title_size = atom.
size - 24;
719 if (title_size > 0) {
729 title_str[title_size] = 0;
731 int off = (!c->
isom && title_str[0] == title_size - 1);
771 int ac3info, acmod, lfeon, bsmod;
783 bsmod = (ac3info >> 14) & 0x7;
784 acmod = (ac3info >> 11) & 0x7;
785 lfeon = (ac3info >> 10) & 0x1;
794 #if FF_API_LAVF_AVCTX
796 st->codec->audio_service_type = *ast;
807 int eac3info, acmod, lfeon, bsmod;
823 bsmod = (eac3info >> 12) & 0x1f;
824 acmod = (eac3info >> 9) & 0x7;
825 lfeon = (eac3info >> 8) & 0x1;
834 #if FF_API_LAVF_AVCTX
836 st->codec->audio_service_type = *ast;
845 const uint32_t ddts_size = 20;
848 uint32_t frame_duration_code = 0;
849 uint32_t channel_layout_code = 0;
856 if (
avio_read(pb, buf, ddts_size) < ddts_size) {
872 frame_duration_code =
get_bits(&gb, 2);
874 channel_layout_code =
get_bits(&gb, 16);
877 (frame_duration_code == 0) ? 512 :
878 (frame_duration_code == 1) ? 1024 :
879 (frame_duration_code == 2) ? 2048 :
880 (frame_duration_code == 3) ? 4096 : 0;
882 if (channel_layout_code > 0xff) {
945 "sample aspect ratio already set to %d:%d, ignoring 'pasp' atom (%d:%d)\n",
948 }
else if (den != 0) {
964 #define DRM_BLOB_SIZE 56
973 uint8_t calculated_checksum[20];
998 for (i = 0; i < 20; i++)
1003 if (!activation_bytes) {
1035 if (memcmp(calculated_checksum, file_checksum, 20)) {
1042 for (i = 0; i < 4; i++) {
1044 if (activation_bytes[i] != output[3 - i]) {
1050 memcpy(c->
file_key, output + 8, 16);
1051 memcpy(input, output + 26, 16);
1068 unsigned char iv[16];
1082 int comp_brand_size;
1083 char* comp_brands_str;
1089 if (strcmp(type,
"qt "))
1096 comp_brand_size = atom.
size - 8;
1097 if (comp_brand_size < 0)
1099 comp_brands_str =
av_malloc(comp_brand_size + 1);
1100 if (!comp_brands_str)
1108 comp_brands_str[comp_brand_size] = 0;
1144 "read the mfra (may be a live ismv)\n");
1148 "seekable, can not look for mfra\n");
1160 struct tm *ptm, tmbuf;
1162 if(time >= 2082844800)
1167 if (strftime(buffer,
sizeof(buffer),
"%Y-%m-%d %H:%M:%S", ptm))
1168 av_dict_set(metadata,
"creation_time", buffer, 0);
1177 char language[4] = {0};
1179 int64_t creation_time;
1219 int64_t creation_time;
1270 if (little_endian == 1) {
1294 char color_parameter_type[5] = { 0 };
1305 if (strncmp(color_parameter_type,
"nclx", 4) &&
1306 strncmp(color_parameter_type,
"nclc", 4)) {
1308 color_parameter_type);
1317 "%s: pri %d trc %d matrix %d",
1318 color_parameter_type, color_primaries, color_trc, color_matrix);
1320 if (!strncmp(color_parameter_type,
"nclx", 4)) {
1340 }
else if (!strncmp(color_parameter_type,
"nclc", 4)) {
1342 switch (color_primaries) {
1348 switch (color_trc) {
1353 switch (color_matrix) {
1367 unsigned mov_field_order;
1376 if ((mov_field_order & 0xFF00) == 0x0100)
1378 else if ((mov_field_order & 0xFF00) == 0x0200) {
1379 switch (mov_field_order & 0xFF) {
1402 if (size > INT_MAX || (uint64_t)atom.
size > INT_MAX)
1416 int64_t result = atom.
size;
1425 }
else if (err < atom.
size) {
1439 uint64_t original_size;
1514 if (cid == 0xd4d || cid == 0xd4e)
1523 if (num <= 0 || den <= 0)
1527 if (den >= INT_MAX / 2)
1546 uint64_t original_size;
1551 if (atom.
size == 16) {
1556 if (length == atom.
size) {
1558 switch (range_value) {
1599 if ((uint64_t)atom.
size > (1<<30))
1610 }
else if (atom.
size > 8) {
1618 if ( (buffer & 0xFFFFFFFF) ==
MKBETAG(
'f',
'r',
'm',
'a')
1619 && buffer >> 32 <= atom.
size
1620 && buffer >> 32 >= 8) {
1624 #define ALAC_EXTRADATA_SIZE 36
1657 if ((uint64_t)atom.
size > (1<<30))
1660 if (atom.
size >= 10) {
1666 if (type ==
MKTAG(
'f',
'i',
'e',
'l') && size == atom.
size)
1691 if (atom.
size >= (1<<28) || atom.
size < 7)
1695 if ((profile_level & 0xf0) != 0xc0)
1719 if (atom.
size <= 40)
1723 if ((uint64_t)atom.
size > (1<<30))
1739 unsigned int i, entries;
1763 if (atom.
type ==
MKTAG(
's',
't',
'c',
'o'))
1766 else if (atom.
type ==
MKTAG(
'c',
'o',
'6',
'4'))
1799 ((format & 0xFFFF) ==
'm' + (
's' << 8) ||
1800 (format & 0xFFFF) ==
'T' + (
'S' << 8)))
1807 format && format !=
MKTAG(
'm',
'p',
'4',
's')) {
1863 if (!memcmp(codec_name,
"Planar Y'CbCr 8-bit 4:2:0", 25)) {
1870 !memcmp(codec_name,
"Sorenson H263", 13))
1886 int bits_per_sample,
flags;
1905 (compatible_brands && strstr(compatible_brands->
value,
"qt "))) {
1912 }
else if (version == 2) {
1927 if (version == 0 || (version == 1 && sc->
audio_cid != -2)) {
1986 if (bits_per_sample) {
2011 y = (ycbcr >> 16) & 0xFF;
2012 cr = (ycbcr >> 8) & 0xFF;
2015 b = av_clip_uint8((1164 * (y - 16) + 2018 * (cb - 128)) / 1000);
2016 g = av_clip_uint8((1164 * (y - 16) - 813 * (cr - 128) - 391 * (cb - 128)) / 1000);
2017 r = av_clip_uint8((1164 * (y - 16) + 1596 * (cr - 128) ) / 1000);
2019 return (r << 16) | (g << 8) | b;
2024 char buf[256] = {0};
2032 snprintf(buf,
sizeof(buf),
"size: %dx%d\n",
2036 for (i = 0; i < 16; i++) {
2037 uint32_t yuv =
AV_RB32(src + i * 4);
2040 av_strlcatf(buf,
sizeof(buf),
"%06"PRIx32
"%s", rgba, i != 15 ?
", " :
"");
2043 if (
av_strlcat(buf,
"\n",
sizeof(buf)) >=
sizeof(buf))
2064 if ((
int)size != size)
2077 #if FF_API_LAVF_AVCTX
2088 #if FF_API_LAVF_AVCTX
2098 if (format ==
AV_RB32(
"name") && (int64_t)size >= (int64_t)len + 18) {
2100 if (str_size > 0 && size >= (
int)str_size + 26) {
2101 char *reel_name =
av_malloc(str_size + 1);
2105 reel_name[str_size] = 0;
2107 if (*reel_name == 0) {
2132 #if CONFIG_DV_DEMUXER
2201 int codec_tag,
int format,
2207 (codec_tag != format &&
2209 : codec_tag !=
MKTAG(
'j',
'p',
'e',
'g')))) {
2218 if ( codec_tag ==
AV_RL32(
"avc1") ||
2219 codec_tag ==
AV_RL32(
"hvc1") ||
2231 int pseudo_stream_id;
2238 for (pseudo_stream_id = 0;
2240 pseudo_stream_id++) {
2243 int ret, dref_id = 1;
2253 }
else if (size <= 7) {
2255 "invalid size %"PRId64
" in stsd\n", size);
2270 "size=%"PRId64
" 4CC= %c%c%c%c/0x%08x codec_type=%d\n", size,
2271 (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,
2295 }
else if (a.
size > 0)
2320 unsigned int i, entries;
2344 for (i = 0; i < entries && !pb->
eof_reached; i++) {
2362 unsigned i, entries;
2380 for (i = 0; i < entries && !pb->
eof_reached; i++) {
2397 unsigned int i, entries;
2420 if (entries >= UINT_MAX /
sizeof(
int))
2428 for (i = 0; i < entries && !pb->
eof_reached; i++) {
2445 unsigned int i, entries, sample_size, field_size, num_bytes;
2458 if (atom.
type ==
MKTAG(
's',
't',
's',
'z')) {
2477 if (field_size != 4 && field_size != 8 && field_size != 16 && field_size != 32) {
2484 if (entries >= (UINT_MAX - 4) / field_size)
2494 num_bytes = (entries*field_size+4)>>3;
2511 for (i = 0; i < entries && !pb->
eof_reached; i++) {
2530 unsigned int i, entries;
2532 int64_t total_sample_count=0;
2554 for (i = 0; i < entries && !pb->
eof_reached; i++) {
2555 int sample_duration;
2561 if (sample_count < 0) {
2569 sample_count, sample_duration);
2573 && sample_count == 1
2574 && total_sample_count > 100
2575 && sample_duration/10 > duration / total_sample_count)
2576 sample_duration = duration / total_sample_count;
2577 duration+=(int64_t)sample_duration*sample_count;
2578 total_sample_count+=sample_count;
2599 if (duration == INT_MIN) {
2611 unsigned int i, entries, ctts_count = 0;
2626 if (entries >= UINT_MAX /
sizeof(*sc->
ctts_data))
2633 for (i = 0; i < entries && !pb->
eof_reached; i++) {
2639 "ignoring CTTS entry with count=%d duration=%d\n",
2651 if (
FFNABS(duration) < -(1<<28) && i+2<entries) {
2676 unsigned int i, entries;
2678 uint32_t grouping_type;
2688 if (grouping_type !=
MKTAG(
'r',
'a',
'p',
' '))
2704 for (i = 0; i < entries && !pb->
eof_reached; i++) {
2717 int64_t current_offset;
2718 int64_t current_dts = 0;
2719 unsigned int stts_index = 0;
2720 unsigned int stsc_index = 0;
2721 unsigned int stss_index = 0;
2722 unsigned int stps_index = 0;
2724 uint64_t stream_size = 0;
2728 int64_t empty_duration = 0;
2733 if (i == 0 && e->
time == -1) {
2737 edit_start_index = 1;
2738 }
else if (i == edit_start_index && e->
time >= 0) {
2739 start_time = e->
time;
2745 "a/v desync might occur, patch welcome\n");
2748 if ((empty_duration || start_time) && mov->
time_scale > 0) {
2769 unsigned int current_sample = 0;
2770 unsigned int stts_sample = 0;
2771 unsigned int sample_size;
2773 unsigned int rap_group_index = 0;
2774 unsigned int rap_group_sample = 0;
2775 int64_t last_dts = 0;
2776 int64_t dts_correction = 0;
2781 last_dts = current_dts;
2828 if (rap_group_present && rap_group_index < sc->rap_group_count) {
2831 if (++rap_group_sample == sc->
rap_group[rap_group_index].
count) {
2832 rap_group_sample = 0;
2838 && !rap_group_present
2847 e->
pos = current_offset;
2849 e->
size = sample_size;
2852 av_log(mov->
fc,
AV_LOG_TRACE,
"AVIndex stream %d, sample %d, offset %"PRIx64
", dts %"PRId64
", "
2853 "size %d, distance %d, keyframe %d\n", st->
index, current_sample,
2854 current_offset, current_dts, sample_size, distance, keyframe);
2859 current_offset += sample_size;
2860 stream_size += sample_size;
2866 "Invalid SampleDelta %d in STTS, at %d st:%d\n",
2873 if (!dts_correction || current_dts + dts_correction > last_dts) {
2874 current_dts += dts_correction;
2878 dts_correction += current_dts - last_dts - 1;
2879 current_dts = last_dts + 1;
2881 last_dts = current_dts;
2894 unsigned chunk_samples, total = 0;
2898 unsigned count, chunk_count;
2911 count = (chunk_samples+samples-1) / samples;
2913 count = (chunk_samples+1023) / 1024;
2916 if (i < sc->stsc_count - 1)
2920 total += chunk_count *
count;
2942 while (chunk_samples > 0) {
2944 unsigned size, samples;
2948 "Zero bytes per frame, but %d samples per frame",
2962 samples =
FFMIN(1024, chunk_samples);
2972 e->
pos = current_offset;
2978 "size %d, duration %d\n", st->
index, i, current_offset, current_dts,
2981 current_offset +=
size;
2982 current_dts += samples;
2983 chunk_samples -= samples;
2999 av_url_split(src_proto,
sizeof(src_proto), src_auth,
sizeof(src_auth), src_host,
sizeof(src_host), &src_port,
NULL, 0, src);
3000 av_url_split(ref_proto,
sizeof(ref_proto), ref_auth,
sizeof(ref_auth), ref_host,
sizeof(ref_host), &ref_port,
NULL, 0, ref);
3002 if (strlen(src) == 0) {
3004 }
else if (strlen(src_auth) + 1 >=
sizeof(src_auth) ||
3005 strlen(ref_auth) + 1 >=
sizeof(ref_auth) ||
3006 strlen(src_host) + 1 >=
sizeof(src_host) ||
3007 strlen(ref_host) + 1 >=
sizeof(ref_host)) {
3009 }
else if (strcmp(src_proto, ref_proto) ||
3010 strcmp(src_auth, ref_auth) ||
3011 strcmp(src_host, ref_host) ||
3012 src_port != ref_port) {
3023 char filename[1025];
3024 const char *src_path;
3028 src_path = strrchr(src,
'/');
3035 for (i = 0, l = strlen(ref->
path) - 1; l >= 0; l--)
3036 if (ref->
path[l] ==
'/') {
3044 if (i == ref->
nlvl_to - 1 && src_path - src <
sizeof(filename)) {
3045 memcpy(filename, src, src_path - src);
3046 filename[src_path -
src] = 0;
3049 av_strlcat(filename,
"../",
sizeof(filename));
3057 "Reference with mismatching origin, %s not tried for security reasons, "
3058 "set demuxer option use_absolute_path to allow it anyway\n",
3063 if(strstr(ref->
path + l + 1,
"..") ||
3064 strstr(ref->
path + l + 1,
":") ||
3065 (ref->
nlvl_from > 1 && same_origin < 0) ||
3066 (filename[0] ==
'/' && src_path == src))
3070 if (strlen(filename) + 1 ==
sizeof(filename))
3077 "this is a possible security issue\n");
3082 "Absolute path %s not tried for security reasons, "
3083 "set demuxer option use_absolute_path to allow absolute paths\n",
3107 if (!st)
return AVERROR(ENOMEM);
3110 if (!sc)
return AVERROR(ENOMEM);
3141 "stream %d, error opening alias: path='%s', dir='%s', "
3142 "filename='%s', volume='%s', nlvl_from=%d, nlvl_to=%d\n",
3147 "Skipped opening external track: "
3148 "stream %d, alias: path='%s', dir='%s', "
3149 "filename='%s', volume='%s', nlvl_from=%d, nlvl_to=%d."
3150 "Set enable_drefs to allow this.\n",
3167 #if FF_API_R_FRAME_RATE
3183 #if CONFIG_H261_DECODER
3186 #if CONFIG_H263_DECODER
3189 #if CONFIG_MPEG4_DECODER
3236 if (count > UINT_MAX /
sizeof(*c->
meta_keys)) {
3238 "The 'keys' atom with the invalid key count: %d\n", count);
3247 for (i = 1; i <=
count; ++i) {
3252 "The key# %d in meta has invalid size: %d\n", i, key_size);
3256 if (type !=
MKTAG(
'm',
'd',
't',
'a')) {
3282 for (i = 0; i < 3; i++) {
3293 if (len < 12 || len - 12 > end -
avio_tell(pb))
3297 if (tag ==
MKTAG(
'm',
'e',
'a',
'n'))
3299 else if (tag ==
MKTAG(
'n',
'a',
'm',
'e'))
3301 else if (tag ==
MKTAG(
'd',
'a',
't',
'a') && len > 4) {
3319 if (mean && key && val) {
3320 if (strcmp(key,
"iTunSMPB") == 0) {
3321 int priming, remainder, samples;
3322 if(sscanf(val,
"%*X %X %X %X", &priming, &remainder, &samples) == 3){
3323 if(priming>0 && priming<16384)
3327 if (strcmp(key,
"cdec") != 0) {
3334 "Unhandled or malformed custom metadata of size %"PRId64
"\n", atom.
size);
3346 while (atom.
size > 8) {
3349 if (tag ==
MKTAG(
'h',
'd',
'l',
'r')) {
3363 int display_matrix[3][3];
3402 for (i = 0; i < 3; i++) {
3410 sc->
width = width >> 16;
3411 sc->
height = height >> 16;
3415 if (display_matrix[0][0] != (1 << 16) ||
3416 display_matrix[1][1] != (1 << 16) ||
3417 display_matrix[2][2] != (1 << 30) ||
3418 display_matrix[0][1] || display_matrix[0][2] ||
3419 display_matrix[1][0] || display_matrix[1][2] ||
3420 display_matrix[2][0] || display_matrix[2][1]) {
3429 for (i = 0; i < 3; i++)
3430 for (j = 0; j < 3; j++)
3434 if (!
isnan(rotate)) {
3435 char rotate_buf[64];
3439 snprintf(rotate_buf,
sizeof(rotate_buf),
"%g", rotate);
3447 double disp_transform[2];
3449 for (i = 0; i < 2; i++)
3450 disp_transform[i] =
hypot(display_matrix[i][0], display_matrix[i][1]);
3452 if (disp_transform[0] > 0 && disp_transform[1] > 0 &&
3453 disp_transform[0] < (1<<24) && disp_transform[1] < (1<<24) &&
3454 fabs((disp_transform[0] / disp_transform[1]) - 1.0) > 0.01)
3456 disp_transform[0] / disp_transform[1],
3467 int flags, track_id, i, found = 0;
3503 "found fragment index for track %u\n", frag->
track_id);
3505 for (j = index->
current_item; j < index->item_count; j++) {
3508 "for track %u and moof_offset %"PRId64
"\n",
3520 if (index && !found) {
3522 "it doesn't have an (in-order) entry for moof_offset "
3599 int data_offset = 0;
3600 unsigned entries, first_sample_flags = frag->
flags;
3650 for (i = 0; i < entries && !pb->
eof_reached; i++) {
3651 unsigned sample_size = frag->
size;
3652 int sample_flags = i ? frag->
flags : first_sample_flags;
3653 unsigned sample_duration = frag->
duration;
3667 " sc->dts_shift %d ctts.duration %d"
3668 " sc->time_offset %"PRId64
" flags & MOV_TRUN_SAMPLE_CTS %d\n", pts,
3672 if (flags & MOV_TRUN_SAMPLE_CTS) {
3681 ", using it for dts\n", dts);
3701 offset, dts, sample_size, distance, keyframe);
3703 dts += sample_duration;
3704 offset += sample_size;
3726 unsigned i, track_id;
3776 if (!index->
items) {
3784 if (size & 0x80000000) {
3832 if (atom.
type !=
MKTAG(
'm',
'd',
'a',
't')) {
3846 long cmov_len, moov_len;
3860 cmov_len = atom.
size - 6 * 4;
3872 goto free_and_return;
3874 if (uncompress (moov_data, (uLongf *) &moov_len, (
const Bytef *)cmov_data, cmov_len) != Z_OK)
3875 goto free_and_return;
3877 goto free_and_return;
3880 atom.
size = moov_len;
3917 for (i = 0; i < edit_count && !pb->
eof_reached; i++) {
3951 static const uint8_t uuid_isml_manifest[] = {
3952 0xa5, 0xd4, 0x0b, 0x30, 0xe8, 0x14, 0x11, 0xdd,
3953 0xba, 0x2f, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66
3955 static const uint8_t uuid_xmp[] = {
3956 0xbe, 0x7a, 0xcf, 0xcb, 0x97, 0xa9, 0x42, 0xe8,
3957 0x9c, 0x71, 0x99, 0x94, 0x91, 0xe3, 0xaf, 0xac
3960 if (atom.
size <
sizeof(uuid) || atom.
size == INT64_MAX)
3963 ret =
avio_read(pb, uuid,
sizeof(uuid));
3966 }
else if (ret !=
sizeof(uuid)) {
3969 if (!memcmp(uuid, uuid_isml_manifest,
sizeof(uuid))) {
3972 size_t len = atom.
size -
sizeof(uuid);
3988 }
else if (ret != len) {
3994 while ((ptr =
av_stristr(ptr,
"systemBitrate=\""))) {
3995 ptr +=
sizeof(
"systemBitrate=\"") - 1;
4004 ret = strtol(ptr, &endptr, 10);
4005 if (ret < 0 || errno || *endptr !=
'"') {
4013 }
else if (!memcmp(uuid, uuid_xmp,
sizeof(uuid))) {
4015 size_t len = atom.
size -
sizeof(uuid);
4025 }
else if (ret != len) {
4052 && !memcmp(content,
"Anevia\x1A\x1A", 8)
4074 case MKTAG(
'e',
'n',
'c',
'v'):
4075 case MKTAG(
'e',
'n',
'c',
'a'):
4080 "ignoring 'frma' atom of '%.4s', stream has codec id %d\n",
4090 if (format != sc->
format) {
4092 "ignoring 'frma' atom of '%.4s', stream format is '%.4s'\n",
4093 (
char*)&format, (
char*)&sc->
format);
4105 size_t auxiliary_info_size;
4123 if (atom.
size < 8) {
4129 auxiliary_info_size = atom.
size - 8;
4159 int atom_header_size;
4173 atom_header_size = 9;
4178 if ((flags & 0x01) != 0) {
4179 atom_header_size += 8;
4188 if (atom.
size <= atom_header_size) {
4193 data_size = atom.
size - atom_header_size;
4212 uint32_t encrypted_bytes;
4213 uint16_t subsample_count;
4214 uint16_t clear_bytes;
4242 for (; subsample_count > 0; subsample_count--)
4255 if ((uint64_t)clear_bytes + encrypted_bytes > input_end - input) {
4261 input += clear_bytes;
4265 input += encrypted_bytes;
4268 if (input < input_end) {
4278 size_t auxiliary_info_seek_offset = 0;
4389 int64_t total_size = 0;
4400 atom.
size = INT64_MAX;
4405 if (atom.
size >= 8) {
4412 uint32_t *
type = (uint32_t *)buf + 1;
4416 if (*type ==
MKTAG(
'm',
'v',
'h',
'd') ||
4417 *type ==
MKTAG(
'c',
'm',
'o',
'v')) {
4422 if (atom.
type !=
MKTAG(
'r',
'o',
'o',
't') &&
4434 if (a.
size == 1 && total_size + 8 <= atom.
size) {
4439 av_log(c->
fc,
AV_LOG_TRACE,
"type: %08x '%.4s' parent:'%.4s' sz: %"PRId64
" %"PRId64
" %"PRId64
"\n",
4442 a.
size = atom.
size - total_size + 8;
4449 for (i = 0; mov_default_parse_table[i].
type; i++)
4450 if (mov_default_parse_table[i].
type == a.
type) {
4473 int err =
parse(c, pb, a);
4489 else if (left < 0) {
4491 "overread end of atom '%.4s' by %"PRId64
" bytes\n",
4492 (
char*)&a.
type, -left);
4497 total_size += a.
size;
4500 if (total_size < atom.
size && atom.
size < 0x7ffff)
4512 int moov_offset = -1;
4518 if ((offset + 8) > (
unsigned int)p->
buf_size)
4523 case MKTAG(
'm',
'o',
'o',
'v'):
4524 moov_offset = offset + 4;
4525 case MKTAG(
'm',
'd',
'a',
't'):
4526 case MKTAG(
'p',
'n',
'o',
't'):
4527 case MKTAG(
'u',
'd',
't',
'a'):
4528 case MKTAG(
'f',
't',
'y',
'p'):
4531 offset + 12 > (
unsigned int)p->
buf_size ||
4534 }
else if (tag ==
MKTAG(
'f',
't',
'y',
'p') &&
4538 score =
FFMAX(score, 5);
4545 case MKTAG(
'e',
'd',
'i',
'w'):
4546 case MKTAG(
'w',
'i',
'd',
'e'):
4547 case MKTAG(
'f',
'r',
'e',
'e'):
4548 case MKTAG(
'j',
'u',
'n',
'k'):
4549 case MKTAG(
'p',
'i',
'c',
't'):
4553 case MKTAG(0x82,0x82,0x7f,0x7d):
4554 case MKTAG(
's',
'k',
'i',
'p'):
4555 case MKTAG(
'u',
'u',
'i',
'd'):
4556 case MKTAG(
'p',
'r',
'f',
'l'):
4568 offset = moov_offset;
4570 while(offset < (p->
buf_size - 16)){
4620 if (end < sample->timestamp) {
4632 if (len > sample->
size-2)
4634 title_len = 2*len + 1;
4647 else if (ch == 0xfffe)
4651 if (len == 1 || len == 2)
4811 int version, fieldlength, i, j;
4842 if (!index->
items) {
4857 for (j = 0; j < ((fieldlength >> 4) & 3) + 1; j++)
4859 for (j = 0; j < ((fieldlength >> 2) & 3) + 1; j++)
4861 for (j = 0; j < ((fieldlength >> 0) & 3) + 1; j++)
4876 if ((seek_ret =
avio_seek(f, stream_size - 4, SEEK_SET)) < 0) {
4881 if (mfra_size < 0 || mfra_size > stream_size) {
4885 if ((seek_ret =
avio_seek(f, -mfra_size, SEEK_CUR)) < 0) {
4905 seek_ret =
avio_seek(f, original_pos, SEEK_SET);
4908 "failed to seek back after looking for mfra\n");
4934 atom.
size = INT64_MAX;
4967 int tmcd_st_id = -1;
4973 if (tmcd_st_id < 0 || tmcd_st_id == i)
5080 int64_t best_dts = INT64_MAX;
5091 ((msc->
pb != s->
pb && dts < best_dts) || (msc->
pb == s->
pb &&
5094 sample = current_sample;
5114 int already_read = 0;
5116 if (
avio_seek(s->
pb, target, SEEK_SET) != target) {
5184 if (ret64 != sample->
pos) {
5206 #if CONFIG_DV_DEMUXER
5266 for (j = index->
item_count - 1; j >= 0; j--) {
5267 if (index->
items[j].
time <= timestamp) {
5292 if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp)
5330 st = s->
streams[stream_index];
5345 if (stream_index == i)
5372 #define OFFSET(x) offsetof(MOVContext, x)
5373 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
5375 {
"use_absolute_path",
5376 "allow using absolute path when opening alias, this is a possible security issue",
5379 {
"seek_streams_individually",
5380 "Seek each stream individually to the to the closest point",
5388 "use mfra for fragment timestamps",
5393 FLAGS,
"use_mfra_for" },
5395 FLAGS,
"use_mfra_for" },
5397 FLAGS,
"use_mfra_for" },
5398 {
"export_all",
"Export unrecognized metadata entries",
OFFSET(export_all),
5400 {
"export_xmp",
"Export full XMP metadata",
OFFSET(export_xmp),
5402 {
"activation_bytes",
"Secret bytes for Audible AAX files",
OFFSET(activation_bytes),
5404 {
"audible_fixed_key",
5405 "Fixed key used for handling Audible AAX files",
OFFSET(audible_fixed_key),
5410 {.i64 = 0}, 0, 1,
FLAGS },
5423 .
name =
"mov,mp4,m4a,3gp,3g2,mj2",
5427 .extensions =
"mov,mp4,m4a,3gp,3g2,mj2",
static int mov_read_targa_y216(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int itunes_metadata
metadata are itunes style
int * bitrates
bitrates read before streams creation
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
static int mov_read_moof(MOVContext *c, AVIOContext *pb, MOVAtom atom)
void av_sha_final(AVSHA *ctx, uint8_t *digest)
Finish hashing and output digest value.
void av_url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
Split a URL string into components.
const char const char void * val
enum AVFieldOrder field_order
Video only.
static int mov_read_esds(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_enda(MOVContext *c, AVIOContext *pb, MOVAtom atom)
enum AVColorTransferCharacteristic color_trc
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t avio_size(AVIOContext *s)
Get the filesize.
static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define av_realloc_f(p, o, n)
uint32_t tmcd_flags
tmcd track flags
uint8_t * auxiliary_info_end
void av_sha_update(AVSHA *ctx, const uint8_t *data, unsigned int len)
Update hash value.
unsigned int rap_group_count
void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id)
static int mov_read_wide(MOVContext *c, AVIOContext *pb, MOVAtom atom)
"Linear transfer characteristics"
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
#define MOV_TFHD_DEFAULT_DURATION
static AVIndexEntry * mov_find_next_sample(AVFormatContext *s, AVStream **st)
static int mov_read_chpl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom)
unsigned int samples_per_frame
static void mov_build_index(MOVContext *mov, AVStream *st)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
av_cold int av_sha_init(AVSHA *ctx, int bits)
Initialize SHA-1 or SHA-2 hashing.
#define AV_LOG_WARNING
Something somehow does not look correct.
uint64_t base_data_offset
#define LIBAVUTIL_VERSION_INT
int64_t pos
byte position in stream, -1 if unknown
static void skip_bits_long(GetBitContext *s, int n)
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
char * av_stristr(const char *s1, const char *s2)
Locate the first case-independent occurrence in the string haystack of the string needle...
static av_always_inline float av_int2float(uint32_t i)
Reinterpret a 32-bit integer as a float.
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
static int mov_metadata_gnre(MOVContext *c, AVIOContext *pb, unsigned len, const char *key)
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int index
stream index in AVFormatContext
#define MOV_TRUN_SAMPLE_CTS
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AVIO_FLAG_READ
read-only
void av_aes_crypt(AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
Encrypt or decrypt a buffer using a previously initialized context.
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
static int tmcd_is_referenced(AVFormatContext *s, int tmcd_id)
int event_flags
Flags for the user to detect events happening on the file.
static int mov_read_saiz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int16_t audio_cid
stsd audio compression id
#define PUT_UTF8(val, tmp, PUT_BYTE)
Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long).
AVPacketSideData * side_data
An array of side data that applies to the whole stream (i.e.
unsigned int avio_rb16(AVIOContext *s)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
static AVRational av_make_q(int num, int den)
Create a rational.
static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_uuid(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen)
Read a UTF-16 string from pb and convert it to UTF-8.
#define FF_INPUT_BUFFER_PADDING_SIZE
enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags)
Compute codec id for 'lpcm' tag.
unsigned fragment_index_count
static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
This struct describes the properties of an encoded stream.
functionally identical to above
int found_moov
'moov' atom has been found
static int mov_read_stps(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static void export_orphan_timecode(AVFormatContext *s)
enum AVColorSpace color_space
static int mov_read_aclr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define MOV_TFHD_DEFAULT_BASE_IS_MOOF
Macro definitions for various function/variable attributes.
int frame_size
Audio only.
static int should_retry(AVIOContext *pb, int error_code)
#define AV_DICT_DONT_STRDUP_KEY
Take ownership of a key that's been allocated with av_malloc() or another memory allocation function...
static int mov_realloc_extradata(AVCodecParameters *par, MOVAtom atom)
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
#define MOV_TKHD_FLAG_ENABLED
int isom
1 if file is ISO Media (mp4/3gp)
int found_mdat
'mdat' atom has been found
static int mov_probe(AVProbeData *p)
static int mov_read_header(AVFormatContext *s)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
void av_aes_ctr_crypt(struct AVAESCTR *a, uint8_t *dst, const uint8_t *src, int count)
Process a buffer using a previously initialized context.
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc, int64_t size)
static double cb(void *priv, double x, double y)
int fragment_index_complete
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static int mov_read_moov(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static const AVOption mov_options[]
static int64_t start_time
static av_always_inline double av_int2double(uint64_t i)
Reinterpret a 64-bit integer as a double.
#define FF_MOV_FLAG_MFRA_DTS
Opaque data information usually continuous.
unsigned int sample_count
const AVCodecTag ff_codec_movvideo_tags[]
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
unsigned int avio_rb32(AVIOContext *s)
int dts_shift
dts shift when ctts is negative
static int mov_read_ddts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static av_cold int end(AVCodecContext *avctx)
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
uint8_t * auxiliary_info_pos
int id
Format-specific stream ID.
enum AVStreamParseType need_parsing
AVInputFormat ff_mov_demuxer
static int mov_read_cmov(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb)
int nb_side_data
The number of elements in the AVStream.side_data array.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AV_CH_LOW_FREQUENCY
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
AVStream ** streams
A list of all streams in the file.
static int mov_metadata_int8_no_padding(MOVContext *c, AVIOContext *pb, unsigned len, const char *key)
static int mov_read_wfex(MOVContext *c, AVIOContext *pb, MOVAtom atom)
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb, int codec_tag, int format, int64_t size)
int activation_bytes_size
MOVFragmentIndex ** fragment_index_data
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
#define ALAC_EXTRADATA_SIZE
int flags
Flags modifying the (de)muxer behaviour.
#define MOV_TRUN_SAMPLE_SIZE
#define AVERROR_EOF
End of file.
bitstream reader API header.
static av_cold int read_close(AVFormatContext *ctx)
#define AV_LOG_VERBOSE
Detailed information.
struct AVAESCTR * aes_ctr
static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
uint64_t avio_rb64(AVIOContext *s)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int ff_replaygain_export(AVStream *st, AVDictionary *metadata)
Parse replaygain tags and export them as per-stream side data.
static int test_same_origin(const char *src, const char *ref)
void av_aes_ctr_free(struct AVAESCTR *a)
Release an AVAESCTR context.
enum AVCodecID video_codec_id
Forced video codec_id.
uint64_t channel_layout
Audio only.
#define MOV_TFHD_DEFAULT_SIZE
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par, int size, int big_endian)
static int mov_read_frma(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int64_t time_offset
time offset of the edit list entries
static int mov_read_custom(MOVContext *c, AVIOContext *pb, MOVAtom atom)
unsigned int keyframe_count
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start, void *log_ctx)
Init a timecode struct with the passed parameters.
const uint16_t avpriv_ac3_channel_layout_tab[8]
Map audio coding mode (acmod) to channel layout mask.
static int mov_read_fiel(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_rewrite_dvd_sub_extradata(AVStream *st)
int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb)
int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
static void mov_parse_stsd_subtitle(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc, int64_t size)
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_DICT_MATCH_CASE
Only get an entry with exact-case key match.
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
AVDictionary * metadata
Metadata that applies to the whole file.
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
static int mov_read_pasp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
unsigned int avio_rl32(AVIOContext *s)
static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_svq3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int64_t timestamp
Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVColorPrimaries color_primaries
int video_delay
Video only.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
preferred ID for decoding MPEG audio layer 1, 2 or 3
enum AVMediaType codec_type
General type of the encoded data.
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
static int mov_open_dref(MOVContext *c, AVIOContext **pb, const char *src, MOVDref *ref)
static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
enum AVPacketSideDataType type
#define FFNABS(a)
Negative Absolute value.
struct AVAES * av_aes_alloc(void)
Allocate an AVAES context.
int skip_samples
Number of samples to skip at the start of the frame decoded from the next packet. ...
static const uint8_t offset[127][2]
static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
AVRational avg_frame_rate
Average framerate.
const AVCodecTag ff_codec_wav_tags[]
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES
int min_distance
Minimum distance between this and the previous keyframe, used to avoid unneeded searching.
static void mov_metadata_creation_time(AVDictionary **metadata, int64_t time)
const AVCodecTag ff_codec_movsubtitle_tags[]
static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define MIN_DATA_ENTRY_BOX_SIZE
static struct tm * gmtime_r(const time_t *clock, struct tm *result)
int flags
A combination of AV_PKT_FLAG values.
int extradata_size
Size of the extradata content in bytes.
int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
int avio_r8(AVIOContext *s)
struct AVAESCTR * av_aes_ctr_alloc(void)
Allocate an AVAESCTR context.
static float distance(float x, float y, int band)
static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
int buf_size
Size of buf except extra allocated bytes.
static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int aax_filter(uint8_t *input, int size, MOVContext *c)
static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
common internal API header
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp, int flags)
static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb, unsigned len, const char *key)
int block_align
Audio only.
static av_const double hypot(double x, double y)
struct AVAES * aes_decrypt
static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static const uint16_t fc[]
uint8_t auxiliary_info_default_size
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
struct MOVStreamContext::@190 cenc
audio channel layout utility functions
AVRational av_d2q(double d, int max)
Convert a double precision floating point number to a rational.
unsigned int avio_rb24(AVIOContext *s)
char filename[1024]
input or output filename
static int mov_read_chap(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
#define AV_TIME_BASE
Internal time base represented as integer.
const AVCodecTag ff_codec_bmp_tags[]
static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
static int mov_read_tmcd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
colour filters using Illuminant C
GLsizei GLboolean const GLfloat * value
static int mov_read_senc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
ITU-R BT2020 non-constant luminance system.
static int mov_read_jp2h(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB]
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
static int mov_read_timecode_track(AVFormatContext *s, AVStream *st)
int audible_fixed_key_size
static int mov_read_tfhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_ares(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_tfdt(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
MOVFragmentIndexItem * items
#define MOV_TRUN_SAMPLE_DURATION
uint8_t * av_stream_new_side_data(AVStream *stream, enum AVPacketSideDataType type, int size)
Allocate new information from stream.
#define AV_CH_FRONT_CENTER
enum AVColorRange color_range
Video only.
static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
static int mov_read_close(AVFormatContext *s)
static int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
This function reads atom content and puts data in extradata without tag nor size unlike mov_read_extr...
int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, int64_t size)
Read 'chan' tag from the input stream.
offset must point to a pointer immediately followed by an int for the length
#define FF_MOV_FLAG_MFRA_PTS
the normal 2^n-1 "JPEG" YUV ranges
static int read_header(FFV1Context *f)
size_t auxiliary_info_sizes_count
int64_t duration
duration of the longest track
int ff_mov_lang_to_iso639(unsigned code, char to[4])
static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt)
Initialize an AVAES context.
DVDemuxContext * dv_demux
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_WB16 unsigned int_TMPL AV_RB8
static int mov_read_seek(AVFormatContext *s, int stream_index, int64_t sample_time, int flags)
static const uint32_t mac_to_unicode[128]
#define AV_LOG_INFO
Standard information.
static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette)
Retrieve the palette (or "color table" in QuickTime terms), either from the video sample description...
#define MP4DecConfigDescrTag
const AVCodecTag ff_codec_movaudio_tags[]
functionally identical to above
static void mov_read_chapters(AVFormatContext *s)
AVIOContext * pb
I/O context.
static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc)
unsigned int stsz_sample_size
always contains sample size from stsz atom
static int read_tfra(MOVContext *mov, AVIOContext *f)
static int mov_read_dac3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define MOV_TRUN_FIRST_SAMPLE_FLAGS
static int mov_read_ilst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
timecode wraps after 24 hours
struct AVSHA * av_sha_alloc(void)
Allocate an AVSHA context.
static int mov_read_free(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
static const char * format
Describe the class of an AVClass context structure.
static void skip_bits(GetBitContext *s, int n)
rational number numerator/denominator
unsigned int aax_mode
'aax' file has been detected
static int mov_read_dpxe(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
MOVFragment fragment
current fragment in moof atom
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
AVRational display_aspect_ratio
display aspect ratio (0 if unknown)
int64_t track_end
used for dts generation in fragmented movie files
static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc)
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
static int mov_read_mac_string(MOVContext *c, AVIOContext *pb, int len, char *dst, int dstlen)
#define MOV_TFHD_DEFAULT_FLAGS
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
#define FF_MOV_FLAG_MFRA_AUTO
#define MOV_TRUN_SAMPLE_FLAGS
This structure contains the data a format has to probe a file.
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
AVFormatContext * dv_fctx
size_t av_strlcat(char *dst, const char *src, size_t size)
Append the string src to the string dst, but to a total length of no more than size - 1 bytes...
static int64_t pts
Global timestamp for the audio frames.
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
static void mov_update_dts_shift(MOVStreamContext *sc, int duration)
static int mov_read_meta(MOVContext *c, AVIOContext *pb, MOVAtom atom)
void av_aes_ctr_set_iv(struct AVAESCTR *a, const uint8_t *iv)
Forcefully change the iv.
char * av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum)
Load timecode string in buf.
unsigned * stps_data
partial sync sample for mpeg-2 open gop
uint8_t * auxiliary_info_sizes
the normal 219*2^(n-8) "MPEG" YUV ranges
int(* parse)(MOVContext *ctx, AVIOContext *pb, MOVAtom atom)
static int mov_read_mdat(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_metadata_int8_bypass_padding(MOVContext *c, AVIOContext *pb, unsigned len, const char *key)
int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
Ensures that the requested seekback buffer size will be available.
int64_t duration
Decoding: duration of the stream, in stream time base.
int sample_rate
Audio only.
static int mov_read_avid(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int start_pad
amount of samples to skip due to enc-dec delay
int trak_index
Index of the current 'trak'.
negative time values are allowed
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_RB64
int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag)
static int mov_read_strf(MOVContext *c, AVIOContext *pb, MOVAtom atom)
An strf atom is a BITMAPINFOHEADER struct.
unsigned int bytes_per_frame
#define FF_DISABLE_DEPRECATION_WARNINGS
int wrong_dts
dts are wrong due to huge ctts offset (iMovie files)
#define MOV_TFHD_BASE_DATA_OFFSET
static int ref[MAX_W *MAX_W]
int ffio_init_context(AVIOContext *s, unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int(*read_packet)(void *opaque, uint8_t *buf, int buf_size), int(*write_packet)(void *opaque, uint8_t *buf, int buf_size), int64_t(*seek)(void *opaque, int64_t offset, int whence))
void * av_realloc(void *ptr, size_t size)
Allocate or reallocate a block of memory.
int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen)
static const MOVParseTableEntry mov_default_parse_table[]
static int parse_timecode_in_framenum_format(AVFormatContext *s, AVStream *st, uint32_t value, int flags)
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
Convenience wrapper for av_dict_set that converts the value to a string and stores it...
int av_reallocp(void *ptr, size_t size)
Allocate or reallocate a block of memory.
static int mov_read_chan(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int disposition
AV_DISPOSITION_* bit field.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
static int mov_codec_id(AVStream *st, uint32_t format)
int64_t nb_frames
number of frames in this stream if known or 0
double av_display_rotation_get(const int32_t matrix[9])
The display transformation matrix specifies an affine transformation that should be applied to video ...
static int mov_metadata_loci(MOVContext *c, AVIOContext *pb, unsigned len)
#define MKBETAG(a, b, c, d)
static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
static int mov_seek_fragment(AVFormatContext *s, AVStream *st, int64_t timestamp)
unsigned int index_entries_allocated_size
static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc)
int eof_reached
true if eof reached
static int mov_read_avss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define FF_ENABLE_DEPRECATION_WARNINGS
as in Berlin toast format
static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom, enum AVCodecID codec_id)
int av_aes_ctr_init(struct AVAESCTR *a, const uint8_t *key)
Initialize an AVAESCTR context.
unsigned int sample_size
may contain value calculated from stsd or value from stsz atom
void * priv_data
Format private data.
static int mov_read_mfra(MOVContext *c, AVIOContext *f)
static const AVClass mov_class
int bits_per_coded_sample
The number of bits per sample in the codedwords.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
#define MOV_TRUN_DATA_OFFSET
int64_t next_root_atom
offset of the next root atom
static int cenc_filter(MOVContext *c, MOVStreamContext *sc, uint8_t *input, int size)
ITU-R BT2020 for 10-bit system.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
static int mov_read_dvc1(MOVContext *c, AVIOContext *pb, MOVAtom atom)
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
static void * av_mallocz_array(size_t nmemb, size_t size)
int pseudo_stream_id
-1 means demux all ids
#define AV_CH_FRONT_RIGHT
static int64_t mov_read_atom_into_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom, AVCodecParameters *par, uint8_t *buf)
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
int ffindex
AVStream index.
static int mov_read_trex(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
AVCodecParameters * codecpar
#define av_malloc_array(a, b)
int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen)
Read a string from pb into buf.
int avio_feof(AVIOContext *s)
feof() equivalent for AVIOContext.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
static int mov_read_alac(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_seek_auxiliary_info(AVFormatContext *s, MOVStreamContext *sc)
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Allocate new information of a packet.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
static int unsupported(AVCodecContext *avctx)
static double cr(void *priv, double x, double y)
#define MKTAG(a, b, c, d)
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed.
static void fix_timescale(MOVContext *c, MOVStreamContext *sc)
AVRational r_frame_rate
Real base framerate of the stream.
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
static int mov_switch_root(AVFormatContext *s, int64_t target)
const char *const ff_id3v1_genre_str[ID3v1_GENRE_MAX+1]
ID3v1 genres.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.
static int mov_read_sbgp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int found_hdlr_mdta
'hdlr' atom with type 'mdta' has been found
AVPacket attached_pic
For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet will contain the attached pictu...
#define AV_NOPTS_VALUE
Undefined timestamp value.
static uint32_t yuv_to_rgba(uint32_t ycbcr)
#define AV_TIMECODE_STR_SIZE
#define MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC
This side data should be associated with an audio stream and corresponds to enum AVAudioServiceType.