Lines Matching defs:atom
82 /* those functions parse an atom */
83 /* links atom IDs to parse functions */
86 int (*parse)(MOVContext *ctx, AVIOContext *pb, MOVAtom atom);
89 static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom);
306 static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
318 switch (atom.type) {
342 return mov_metadata_hmmt(c, pb, atom.size);
346 return mov_metadata_loci(c, pb, atom.size);
410 if (c->itunes_metadata && atom.size > 8) {
413 if (tag == MKTAG('d','a','t','a') && data_size <= atom.size && data_size >= 16) {
417 atom.size -= 16;
420 uint32_t index = av_bswap32(atom.type); // BE number has been read as LE
423 } else if (atom.type != MKTAG('c', 'o', 'v', 'r')) {
429 if (atom.type == MKTAG('c', 'o', 'v', 'r') ||
436 atom.size -= str_size;
437 if (atom.size > 8)
442 } else if (atom.size > 4 && key && !c->itunes_metadata && !raw) {
444 if (str_size > atom.size) {
452 atom.size -= 4;
454 str_size = atom.size;
457 key = av_fourcc_make_string(tmp_key, atom.type);
462 if (atom.size < 0 || str_size >= INT_MAX/2)
587 static int mov_read_chpl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
597 if ((atom.size -= 5) < 0)
607 if (atom.size < 9)
613 if ((atom.size -= 9+str_len) < 0)
626 static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
640 entries > (atom.size - 1) / MIN_DATA_ENTRY_BOX_SIZE + 1 ||
770 static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
814 title_size = atom.size - 24;
844 static int mov_read_esds(MOVContext *c, AVIOContext *pb, MOVAtom atom)
849 static int mov_read_dac3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
883 static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
921 static int mov_read_ddts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
974 static int mov_read_chan(MOVContext *c, AVIOContext *pb, MOVAtom atom)
982 if (atom.size < 16)
988 ff_mov_read_chan(c->fc, pb, st, atom.size - 4);
993 static int mov_read_wfex(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1002 if ((ret = ff_get_wav_header(c->fc, pb, st->codecpar, atom.size, 0)) < 0)
1008 /* This atom overrides any previously set aspect ratio */
1009 static int mov_read_pasp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1026 /* this atom contains actual media data */
1027 static int mov_read_mdat(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1029 if (atom.size == 0) /* wrong one (MP4) */
1037 static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1175 static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1195 comp_brand_size = atom.size - 8;
1219 /* this atom should contain all header atoms */
1220 static int mov_read_moov(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1226 avio_skip(pb, atom.size);
1230 if ((ret = mov_read_default(c, pb, atom)) < 0)
1232 /* we parsed the 'moov' atom, we can terminate the parsing as soon as we find the 'mdat' */
1459 static int mov_read_moof(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1482 return mov_read_default(c, pb, atom);
1500 static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1553 static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1633 static int mov_read_enda(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1642 static int mov_read_pcmc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1646 if (atom.size < 6) {
1660 static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1684 icc_profile = av_stream_new_side_data(st, AV_PKT_DATA_ICC_PROFILE, atom.size - 4);
1687 ret = ffio_read_size(pb, icc_profile, atom.size - 4);
1723 static int mov_read_fiel(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1732 if (atom.size < 2)
1757 static int mov_realloc_extradata(AVCodecParameters *par, MOVAtom atom)
1760 uint64_t size = (uint64_t)par->extradata_size + atom.size + 8 + AV_INPUT_BUFFER_PADDING_SIZE;
1761 if (size > INT_MAX || (uint64_t)atom.size > INT_MAX)
1771 /* Read a whole atom into the extradata return the size of the atom read, possibly truncated if != atom.size */
1772 static int64_t mov_read_atom_into_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom,
1775 int64_t result = atom.size;
1778 AV_WB32(buf , atom.size + 8);
1779 AV_WL32(buf + 4, atom.type);
1780 err = ffio_read_size(pb, buf + 8, atom.size);
1782 par->extradata_size -= atom.size;
1784 } else if (err < atom.size) {
1786 par->extradata_size -= atom.size - err;
1793 /* FIXME modify QDM2/SVQ3/H.264 decoders to take full atom as extradata */
1794 static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom,
1809 err = mov_realloc_extradata(st->codecpar, atom);
1813 err = mov_read_atom_into_extradata(c, pb, atom, st->codecpar, st->codecpar->extradata + original_size);
1820 static int mov_read_alac(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1822 return mov_read_extradata(c, pb, atom, AV_CODEC_ID_ALAC);
1825 static int mov_read_avss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1827 return mov_read_extradata(c, pb, atom, AV_CODEC_ID_AVS);
1830 static int mov_read_jp2h(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1832 return mov_read_extradata(c, pb, atom, AV_CODEC_ID_JPEG2000);
1835 static int mov_read_dpxe(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1837 return mov_read_extradata(c, pb, atom, AV_CODEC_ID_R10K);
1840 static int mov_read_avid(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1842 int ret = mov_read_extradata(c, pb, atom, AV_CODEC_ID_AVUI);
1844 ret = mov_read_extradata(c, pb, atom, AV_CODEC_ID_DNXHD);
1848 static int mov_read_targa_y216(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1850 int ret = mov_read_extradata(c, pb, atom, AV_CODEC_ID_TARGA_Y216);
1862 static int mov_read_ares(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1871 atom.size > 11) {
1882 atom.size >= 24) {
1902 return mov_read_avid(c, pb, atom);
1905 static int mov_read_aclr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1914 if (atom.size == 16) {
1916 ret = mov_realloc_extradata(par, atom);
1918 length = mov_read_atom_into_extradata(c, pb, atom, par, par->extradata + original_size);
1919 if (length == atom.size) {
1934 /* For some reason the whole atom was not added to the extradata */
1935 av_log(c->fc, AV_LOG_ERROR, "aclr not decoded - incomplete atom\n");
1938 av_log(c->fc, AV_LOG_ERROR, "aclr not decoded - unable to add atom to extradata\n");
1941 av_log(c->fc, AV_LOG_WARNING, "aclr not decoded - unexpected size %"PRId64"\n", atom.size);
1948 static int mov_read_svq3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1950 return mov_read_extradata(c, pb, atom, AV_CODEC_ID_SVQ3);
1953 static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1962 if ((uint64_t)atom.size > (1<<30))
1968 // pass all frma atom to codec, needed at least for QDMC and QDM2
1969 ret = ff_get_extradata(c->fc, st->codecpar, pb, atom.size);
1972 } else if (atom.size > 8) { /* to read frma, esds atoms */
1973 if (st->codecpar->codec_id == AV_CODEC_ID_ALAC && atom.size >= 24) {
1979 atom.size -= 8;
1981 && buffer >> 32 <= atom.size
1984 atom.size += 8;
1995 avio_skip(pb, atom.size - 24);
1999 if ((ret = mov_read_default(c, pb, atom)) < 0)
2002 avio_skip(pb, atom.size);
2007 * This function reads atom content and puts data in extradata without tag
2010 static int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
2019 if ((uint64_t)atom.size > (1<<30))
2022 if (atom.type == MKTAG('v','v','c','C')) {
2024 atom.size -= 4;
2027 if (atom.size >= 10) {
2029 // wrap a whole fiel atom inside of a glbl atom.
2035 if (type == MKTAG('f','i','e','l') && size == atom.size)
2036 return mov_read_default(c, pb, atom);
2042 ret = ff_get_extradata(c->fc, st->codecpar, pb, atom.size);
2045 if (atom.type == MKTAG('h','v','c','C') && st->codecpar->codec_tag == MKTAG('d','v','h','1'))
2053 if (atom.type == MKTAG('v','v','c','C'))
2059 static int mov_read_dvc1(MOVContext *c, AVIOContext *pb, MOVAtom atom)
2069 if (atom.size >= (1<<28) || atom.size < 7)
2077 ret = ff_get_extradata(c->fc, st->codecpar, pb, atom.size - 7);
2085 * An strf atom is a BITMAPINFOHEADER struct. This struct is 40 bytes itself,
2089 static int mov_read_strf(MOVContext *c, AVIOContext *pb, MOVAtom atom)
2096 if (atom.size <= 40)
2100 if ((uint64_t)atom.size > (1<<30))
2104 ret = ff_get_extradata(c->fc, st->codecpar, pb, atom.size - 40);
2111 static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom)
2135 av_log(c->fc, AV_LOG_WARNING, "Ignoring duplicated STCO atom\n");
2145 if (atom.type == MKTAG('s','t','c','o'))
2148 else if (atom.type == MKTAG('c','o','6','4'))
2157 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted STCO atom\n");
2385 // color, fonts, and default styles, so fake an atom to read it
2387 // mp4s contains a regular esds atom
2487 static int mov_read_cdsc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
2527 uint32_t len = AV_RB32(st->codecpar->extradata + 18); /* name atom length */
2776 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted STSD atom\n");
2783 static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
2799 if (entries <= 0 || entries > atom.size / 8 || entries > 1024) {
2848 static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
2863 if ((uint64_t)entries * 12 + 4 > atom.size)
2871 av_log(c->fc, AV_LOG_WARNING, "Ignoring duplicated STSC atom\n");
2916 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted STSC atom\n");
2944 static int mov_read_stps(MOVContext *c, AVIOContext *pb, MOVAtom atom)
2959 av_log(c->fc, AV_LOG_WARNING, "Duplicated STPS atom\n");
2973 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted STPS atom\n");
2980 static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
3007 av_log(c->fc, AV_LOG_WARNING, "Duplicated STSS atom\n");
3023 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted STSS atom\n");
3030 static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
3047 if (atom.type == MKTAG('s','t','s','z')) {
3076 av_log(c->fc, AV_LOG_WARNING, "Duplicated STSZ atom\n");
3095 av_log(c->fc, AV_LOG_WARNING, "STSZ atom truncated\n");
3118 static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
3141 av_log(c->fc, AV_LOG_WARNING, "Duplicated STTS atom\n");
3220 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted STTS atom\n");
3231 static int mov_read_sdtp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
3244 entries = atom.size - 4;
3250 av_log(c->fc, AV_LOG_WARNING, "Duplicated SDTP atom\n");
3276 static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
3346 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted CTTS atom\n");
3355 static int mov_read_sgpd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
3404 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted SGPD atom\n");
3411 static int mov_read_sbgp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
3447 av_log(c->fc, AV_LOG_WARNING, "Duplicated SBGP %s atom\n", av_fourcc2str(grouping_type));
3462 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted SBGP atom\n");
4616 static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
4637 if ((ret = mov_read_default(c, pb, atom)) < 0)
4751 static int mov_read_ilst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
4755 ret = mov_read_default(c, pb, atom);
4760 static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom)
4765 if (atom.size < 8)
4772 "The 'keys' atom with the invalid key count: %"PRIu32"\n", count);
4813 static int mov_read_custom(MOVContext *c, AVIOContext *pb, MOVAtom atom)
4815 int64_t end = av_sat_add64(avio_tell(pb), atom.size);
4884 "Unhandled or malformed custom metadata of size %"PRId64"\n", atom.size);
4894 static int mov_read_meta(MOVContext *c, AVIOContext *pb, MOVAtom atom)
4896 while (atom.size > 8) {
4901 atom.size -= 4;
4904 atom.size += 8;
4905 return mov_read_default(c, pb, atom);
4920 static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5024 static int mov_read_tfhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5070 static int mov_read_chap(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5075 num = atom.size / 4;
5091 static int mov_read_trex(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5117 static int mov_read_tfdt(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5155 static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5445 av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted TRUN atom\n");
5458 static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5461 int64_t offset = av_sat_add64(avio_tell(pb), atom.size), pts, timestamp;
5592 /* this atom should be null (from specs), but some buggy files put the 'moov' atom inside it... */
5595 static int mov_read_wide(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5599 if (atom.size < 8)
5601 if (avio_rb32(pb) != 0) { /* 0 sized mdat atom... use the 'wide' atom size */
5602 avio_skip(pb, atom.size - 4);
5605 atom.type = avio_rl32(pb);
5606 atom.size -= 8;
5607 if (atom.type != MKTAG('m','d','a','t')) {
5608 avio_skip(pb, atom.size);
5611 err = mov_read_mdat(c, pb, atom);
5615 static int mov_read_cmov(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5624 avio_rb32(pb); /* dcom atom */
5628 av_log(c->fc, AV_LOG_ERROR, "unknown compression for cmov atom !\n");
5631 avio_rb32(pb); /* cmvd atom */
5635 cmov_len = atom.size - 6 * 4;
5654 atom.type = MKTAG('m','o','o','v');
5655 atom.size = moov_len;
5656 ret = mov_read_default(c, &ctx.pub, atom);
5667 /* edit list atom */
5668 static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5681 atom.size -= 8;
5684 if (atom.size != edit_count * elst_entry_size) {
5686 av_log(c->fc, AV_LOG_ERROR, "Invalid edit list entry_count: %d for elst atom of size: %"PRId64" bytes.\n",
5687 edit_count, atom.size + 8);
5690 edit_count = atom.size / elst_entry_size;
5691 if (edit_count * elst_entry_size != atom.size) {
5692 av_log(c->fc, AV_LOG_WARNING, "ELST atom of %"PRId64" bytes, bigger than %d entries.\n", atom.size, edit_count);
5700 av_log(c->fc, AV_LOG_WARNING, "Duplicated ELST atom\n");
5708 for (i = 0; i < edit_count && atom.size > 0 && !pb->eof_reached; i++) {
5714 atom.size -= 16;
5718 atom.size -= 8;
5721 atom.size -= 4;
5737 static int mov_read_tmcd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5748 static int mov_read_vpcc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5757 if (atom.size < 5) {
5792 static int mov_read_smdm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5802 if (atom.size < 5) {
5837 static int mov_read_mdcv(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5850 if (atom.size < 24 || sc->mastering) {
5876 static int mov_read_coll(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5886 if (atom.size < 5) {
5913 static int mov_read_clli(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5922 if (atom.size < 4) {
5942 static int mov_read_st3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
5955 if (atom.size < 5) {
5989 static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
6005 if (atom.size < 8) {
6011 if (size <= 12 || size > atom.size)
6029 if (size > atom.size)
6039 if (size > atom.size)
6061 if (size > atom.size)
6189 static int mov_read_uuid(MOVContext *c, AVIOContext *pb, MOVAtom atom)
6208 if (atom.size < AV_UUID_LEN || atom.size >= FFMIN(INT_MAX, SIZE_MAX))
6222 size_t len = atom.size - AV_UUID_LEN;
6262 size_t len = atom.size - AV_UUID_LEN;
6277 // skip all uuid atom, which makes it fast for long uuid-xmp file
6283 size_t len = atom.size - AV_UUID_LEN;
6294 static int mov_read_free(MOVContext *c, AVIOContext *pb, MOVAtom atom)
6299 if (atom.size < 8)
6302 ret = ffio_read_size(pb, content, FFMIN(sizeof(content), atom.size));
6316 static int mov_read_frma(MOVContext *c, AVIOContext *pb, MOVAtom atom)
6336 "ignoring 'frma' atom of '%.4s', stream has codec id %d\n",
6348 "ignoring 'frma' atom of '%.4s', stream format is '%.4s'\n",
6464 static int mov_read_senc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
6614 static int mov_read_saiz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
6632 av_log(c->fc, AV_LOG_ERROR, "Duplicate saiz atom\n");
6686 static int mov_read_saio(MOVContext *c, AVIOContext *pb, MOVAtom atom)
6706 av_log(c->fc, AV_LOG_ERROR, "Duplicate saio atom\n");
6829 static int mov_read_pssh_ex(MOVContext *c, AVIOContext *pb, MOVAtom atom)
6841 (atom.size > (AV_DRM_MAX_DRM_PSSH_LEN - MOV_DRM_PSSH_TITLE_LEN)) || (atom.size == 0)) {
6847 AV_WB32(pssh_buf, (atom.size + MOV_DRM_PSSH_TITLE_LEN));
6850 if ((ret = ffio_read_size(pb, pssh_buf + MOV_DRM_PSSH_TITLE_LEN, atom.size)) < 0) {
6854 if ((ret = mov_set_drm_info(pssh_buf, (uint32_t)(atom.size + MOV_DRM_PSSH_TITLE_LEN), &side_data_node)) != 0) {
6878 static int mov_read_pssh(MOVContext *c, AVIOContext *pb, MOVAtom atom)
6986 static int mov_read_schm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7001 if (atom.size < 8)
7017 static int mov_read_tenc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7029 av_log(c->fc, AV_LOG_ERROR, "tenc atom are only supported in first sample descriptor\n");
7040 if (atom.size < 20)
7075 av_log(c->fc, AV_LOG_ERROR, "invalid default_constant_IV_size in tenc atom\n");
7088 static int mov_read_dfla(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7098 if ((uint64_t)atom.size > (1<<30) || atom.size < 42)
7417 av_log(mov->fc, AV_LOG_ERROR, "saiz atom found without saio\n");
7422 av_log(mov->fc, AV_LOG_ERROR, "saio atom found without saiz\n");
7463 static int mov_read_dops(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7475 if ((uint64_t)atom.size > (1<<30) || atom.size < 11)
7485 size = atom.size + 8;
7512 static int mov_read_dmlp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7524 if (atom.size < 10)
7547 static int mov_read_dvcc_dvvc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7552 int64_t read_size = atom.size;
7567 static int mov_read_kind(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7574 int64_t size = atom.size;
7576 if (atom.size < 6)
7656 static int mov_read_SA3D(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7667 if (atom.size < 16) {
7724 static int mov_read_SAND(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7734 if (atom.size < 5) {
7767 static int mov_read_pitm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7771 return atom.size;
7774 static int mov_read_iloc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7889 return atom.size;
7894 static int mov_read_gnre(MOVContext *c, AVIOContext *pb, MOVAtom atom)
7897 if (atom.size > 0) {
7898 if (atom.size > FFMIN(INT_MAX, SIZE_MAX - 1))
7900 char* genre = av_mallocz(atom.size + 1); /* Add null terminator */
7904 int ret = ffio_read_size(pb, genre, atom.size);
7910 for (i = 0; i < atom.size; ++i) {
7956 { MKTAG('a','l','a','c'), mov_read_alac }, /* alac specific atom */
8040 static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
8052 if (atom.size < 0)
8053 atom.size = INT64_MAX;
8054 while (total_size <= atom.size - 8) {
8072 av_log(c->fc, AV_LOG_ERROR, "Detected moov in a free or hoov atom.\n");
8076 if (atom.type != MKTAG('r','o','o','t') &&
8077 atom.type != MKTAG('m','o','o','v')) {
8087 if (a.size == 1 && total_size + 8 <= atom.size) { /* 64 bit extended size */
8092 av_fourcc2str(a.type), av_fourcc2str(atom.type), a.size, total_size, atom.size);
8094 a.size = atom.size - total_size + 8;
8101 a.size = FFMIN(a.size, atom.size - total_size);
8110 if (!parse && (atom.type == MKTAG('u','d','t','a') ||
8111 atom.type == MKTAG('i','l','s','t')))
8124 atom.type == MKTAG('m','e','t','a') &&
8149 if (left > 0) /* skip garbage at atom end */
8153 "overread end of atom '%s' by %"PRId64" bytes\n",
8162 if (total_size < atom.size && atom.size < 0x7ffff)
8163 avio_skip(pb, atom.size - total_size);
8235 /* moov atom in the header - we should make sure that this is not a
8240 /* We found an actual hdlr atom */
8245 /* We found a media handler reference atom describing an
8330 // atom following, but in practice are only utf-8 or utf-16, distinguished
8695 MOVAtom atom = { AV_RL32("root") };
8708 atom.size = avio_size(pb);
8710 atom.size = INT64_MAX;
8716 if ((err = mov_read_default(mov, pb, atom)) < 0) {
8722 av_log(s, AV_LOG_ERROR, "moov atom not found\n");
8943 av_log(mov->fc, AV_LOG_ERROR, "root atom offset 0x%"PRIx64": partial file\n", target);
9404 {"ignore_editlist", "Ignore the edit list atom.", OFFSET(ignore_editlist), AV_OPT_TYPE_BOOL, {.i64 = 0},