History

avformat/mov: reindent after previous commit

Zhao Zhili committed 4 years ago

Commit 4f698be1 parent 43fe6e11 file · +20 −20Browse files

Unified · Split

libavformat/mov.c+20−20
@@ -7691,12 +7691,12 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 7690 unmodified lines
76917691 atom.size = INT64_MAX;
76927692 while (total_size <= atom.size - 8 && !avio_feof(pb)) {
76937693 int (*parse)(MOVContext*, AVIOContext*, MOVAtom) = NULL;
7694− a.size = avio_rb32(pb);
7695− a.type = avio_rl32(pb);
7696− if (((a.type == MKTAG('f','r','e','e') && c->moov_retry) ||
7697− a.type == MKTAG('h','o','o','v')) &&
7698− a.size >= 8 &&
7699− c->fc->strict_std_compliance < FF_COMPLIANCE_STRICT) {
7694+ a.size = avio_rb32(pb);
7695+ a.type = avio_rl32(pb);
7696+ if (((a.type == MKTAG('f','r','e','e') && c->moov_retry) ||
7697+ a.type == MKTAG('h','o','o','v')) &&
7698+ a.size >= 8 &&
7699+ c->fc->strict_std_compliance < FF_COMPLIANCE_STRICT) {
77007700 uint32_t type;
77017701 avio_skip(pb, 4);
77027702 type = avio_rl32(pb);
@@ -7708,22 +7708,22 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 5 unmodified lines
77087708 av_log(c->fc, AV_LOG_ERROR, "Detected moov in a free or hoov atom.\n");
77097709 a.type = MKTAG('m','o','o','v');
77107710 }
7711+ }
7712+ if (atom.type != MKTAG('r','o','o','t') &&
7713+ atom.type != MKTAG('m','o','o','v')) {
7714+ if (a.type == MKTAG('t','r','a','k') ||
7715+ a.type == MKTAG('m','d','a','t')) {
7716+ av_log(c->fc, AV_LOG_ERROR, "Broken file, trak/mdat not at top-level\n");
7717+ avio_skip(pb, -8);
7718+ c->atom_depth --;
7719+ return 0;
77117720 }
7712− if (atom.type != MKTAG('r','o','o','t') &&
7713− atom.type != MKTAG('m','o','o','v')) {
7714− if (a.type == MKTAG('t','r','a','k') ||
7715− a.type == MKTAG('m','d','a','t')) {
7716− av_log(c->fc, AV_LOG_ERROR, "Broken file, trak/mdat not at top-level\n");
7717− avio_skip(pb, -8);
7718− c->atom_depth --;
7719− return 0;
7720− }
7721− }
7721+ }
7722+ total_size += 8;
7723+ if (a.size == 1 && total_size + 8 <= atom.size) { /* 64 bit extended size */
7724+ a.size = avio_rb64(pb) - 8;
77227725 total_size += 8;
7723− if (a.size == 1 && total_size + 8 <= atom.size) { /* 64 bit extended size */
7724− a.size = avio_rb64(pb) - 8;
7725− total_size += 8;
7726− }
7726+ }
77277727 av_log(c->fc, AV_LOG_TRACE, "type:'%s' parent:'%s' sz: %"PRId64" %"PRId64" %"PRId64"\n",
77287728 av_fourcc2str(a.type), av_fourcc2str(atom.type), a.size, total_size, atom.size);
77297729 if (a.size == 0) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t