mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
matroskadec: cosmetics: indentation of matroska_execute_seekhead()
Originally committed as revision 14566 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
82113343a7
commit
4348571b1a
@ -1356,69 +1356,69 @@ matroska_execute_seekhead(MatroskaDemuxContext *matroska)
|
|||||||
|| seekhead[i].id == MATROSKA_ID_CLUSTER)
|
|| seekhead[i].id == MATROSKA_ID_CLUSTER)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* seek */
|
/* seek */
|
||||||
if (ebml_read_seek(matroska,
|
if (ebml_read_seek(matroska,
|
||||||
seekhead[i].pos+matroska->segment_start) < 0)
|
seekhead[i].pos+matroska->segment_start) < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* we don't want to lose our seekhead level, so we add
|
/* we don't want to lose our seekhead level, so we add
|
||||||
* a dummy. This is a crude hack. */
|
* a dummy. This is a crude hack. */
|
||||||
if (matroska->num_levels == EBML_MAX_DEPTH) {
|
if (matroska->num_levels == EBML_MAX_DEPTH) {
|
||||||
av_log(matroska->ctx, AV_LOG_INFO,
|
av_log(matroska->ctx, AV_LOG_INFO,
|
||||||
"Max EBML element depth (%d) reached, "
|
"Max EBML element depth (%d) reached, "
|
||||||
"cannot parse further.\n", EBML_MAX_DEPTH);
|
"cannot parse further.\n", EBML_MAX_DEPTH);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
level.start = 0;
|
level.start = 0;
|
||||||
level.length = (uint64_t)-1;
|
level.length = (uint64_t)-1;
|
||||||
matroska->levels[matroska->num_levels] = level;
|
matroska->levels[matroska->num_levels] = level;
|
||||||
matroska->num_levels++;
|
matroska->num_levels++;
|
||||||
|
|
||||||
/* check ID */
|
/* check ID */
|
||||||
if (!(id = ebml_peek_id (matroska,
|
if (!(id = ebml_peek_id (matroska,
|
||||||
&matroska->level_up)))
|
&matroska->level_up)))
|
||||||
goto finish;
|
goto finish;
|
||||||
if (id != seekhead[i].id) {
|
if (id != seekhead[i].id) {
|
||||||
av_log(matroska->ctx, AV_LOG_INFO,
|
av_log(matroska->ctx, AV_LOG_INFO,
|
||||||
"We looked for ID=0x%x but got "
|
"We looked for ID=0x%x but got "
|
||||||
"ID=0x%x (pos=%"PRIu64")",
|
"ID=0x%x (pos=%"PRIu64")",
|
||||||
(int)seekhead[i].id, id, seekhead[i].pos +
|
(int)seekhead[i].id, id, seekhead[i].pos +
|
||||||
matroska->segment_start);
|
matroska->segment_start);
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read master + parse */
|
/* read master + parse */
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case MATROSKA_ID_CUES:
|
case MATROSKA_ID_CUES:
|
||||||
if (!(res = matroska_parse_index(matroska)) ||
|
if (!(res = matroska_parse_index(matroska)) ||
|
||||||
url_feof(matroska->ctx->pb)) {
|
url_feof(matroska->ctx->pb)) {
|
||||||
matroska->index_parsed = 1;
|
matroska->index_parsed = 1;
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MATROSKA_ID_TAGS:
|
case MATROSKA_ID_TAGS:
|
||||||
if (!(res = matroska_parse_metadata(matroska)) ||
|
if (!(res = matroska_parse_metadata(matroska)) ||
|
||||||
url_feof(matroska->ctx->pb)) {
|
url_feof(matroska->ctx->pb)) {
|
||||||
matroska->metadata_parsed = 1;
|
matroska->metadata_parsed = 1;
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
/* remove dummy level */
|
/* remove dummy level */
|
||||||
while (matroska->num_levels) {
|
while (matroska->num_levels) {
|
||||||
uint64_t length = matroska->levels[--matroska->num_levels].length;
|
uint64_t length = matroska->levels[--matroska->num_levels].length;
|
||||||
if (length == (uint64_t)-1)
|
if (length == (uint64_t)-1)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* seek back */
|
/* seek back */
|
||||||
ebml_read_seek(matroska, before_pos);
|
ebml_read_seek(matroska, before_pos);
|
||||||
matroska->peek_id = peek_id_cache;
|
matroska->peek_id = peek_id_cache;
|
||||||
matroska->level_up = level_up;
|
matroska->level_up = level_up;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user