|
@@ -643,7 +643,7 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom) |
|
|
av_log(c->fc, AV_LOG_TRACE, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype); |
|
|
av_log(c->fc, AV_LOG_TRACE, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype); |
|
|
av_log(c->fc, AV_LOG_TRACE, "stype= %.4s\n", (char*)&type); |
|
|
av_log(c->fc, AV_LOG_TRACE, "stype= %.4s\n", (char*)&type); |
|
|
|
|
|
|
|
|
if (c->fc->nb_streams < 1) { // meta before first trak |
|
|
|
|
|
|
|
|
if (c->trak_index < 0) { // meta not inside a trak |
|
|
if (type == MKTAG('m','d','t','a')) { |
|
|
if (type == MKTAG('m','d','t','a')) { |
|
|
c->found_hdlr_mdta = 1; |
|
|
c->found_hdlr_mdta = 1; |
|
|
} |
|
|
} |
|
@@ -3073,10 +3073,13 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) |
|
|
st->priv_data = sc; |
|
|
st->priv_data = sc; |
|
|
st->codec->codec_type = AVMEDIA_TYPE_DATA; |
|
|
st->codec->codec_type = AVMEDIA_TYPE_DATA; |
|
|
sc->ffindex = st->index; |
|
|
sc->ffindex = st->index; |
|
|
|
|
|
c->trak_index = st->index; |
|
|
|
|
|
|
|
|
if ((ret = mov_read_default(c, pb, atom)) < 0) |
|
|
if ((ret = mov_read_default(c, pb, atom)) < 0) |
|
|
return ret; |
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
c->trak_index = -1; |
|
|
|
|
|
|
|
|
/* sanity checks */ |
|
|
/* sanity checks */ |
|
|
if (sc->chunk_count && (!sc->stts_count || !sc->stsc_count || |
|
|
if (sc->chunk_count && (!sc->stts_count || !sc->stsc_count || |
|
|
(!sc->sample_size && !sc->sample_count))) { |
|
|
(!sc->sample_size && !sc->sample_count))) { |
|
@@ -4617,6 +4620,7 @@ static int mov_read_header(AVFormatContext *s) |
|
|
int i; |
|
|
int i; |
|
|
|
|
|
|
|
|
mov->fc = s; |
|
|
mov->fc = s; |
|
|
|
|
|
mov->trak_index = -1; |
|
|
/* .mov and .mp4 aren't streamable anyway (only progressive download if moov is before mdat) */ |
|
|
/* .mov and .mp4 aren't streamable anyway (only progressive download if moov is before mdat) */ |
|
|
if (pb->seekable) |
|
|
if (pb->seekable) |
|
|
atom.size = avio_size(pb); |
|
|
atom.size = avio_size(pb); |
|
|