diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-09 12:25:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-09 12:25:52 +0200 |
commit | 7b973e734111caccc737fcc6d1ed5a6a111c8831 (patch) | |
tree | a346a6328e05a818729d37f07c11e5630e859e22 | |
parent | d3834f290138cb8c48fd404081ac5b9a2ca14564 (diff) | |
parent | 2bc220958c7570020d87ee353db65460b518998a (diff) | |
download | ffmpeg-7b973e734111caccc737fcc6d1ed5a6a111c8831.tar.gz |
Merge commit '2bc220958c7570020d87ee353db65460b518998a'
* commit '2bc220958c7570020d87ee353db65460b518998a':
ismindex: handle discontinuous streams better
Conflicts:
tools/ismindex.c
See: d3834f290138cb8c48fd404081ac5b9a2ca14564
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | tools/ismindex.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tools/ismindex.c b/tools/ismindex.c index b9bcedebde..274223decc 100644 --- a/tools/ismindex.c +++ b/tools/ismindex.c @@ -235,24 +235,24 @@ static int64_t read_trun_duration(AVIOContext *in, int64_t end) int entries; avio_r8(in); /* version */ flags = avio_rb24(in); - if (! (flags & MOV_TRUN_SAMPLE_DURATION)) { - fprintf(stderr, "no sample duration in trun flags"); + if (!(flags & MOV_TRUN_SAMPLE_DURATION)) { + fprintf(stderr, "No sample duration in trun flags\n"); return -1; } entries = avio_rb32(in); - if (flags & MOV_TRUN_DATA_OFFSET) avio_rb32(in); + if (flags & MOV_TRUN_DATA_OFFSET) avio_rb32(in); if (flags & MOV_TRUN_FIRST_SAMPLE_FLAGS) avio_rb32(in); pos = avio_tell(in); for (i = 0; i < entries && pos < end; i++) { int sample_duration = 0; if (flags & MOV_TRUN_SAMPLE_DURATION) sample_duration = avio_rb32(in); - if (flags & MOV_TRUN_SAMPLE_SIZE) avio_rb32(in); - if (flags & MOV_TRUN_SAMPLE_FLAGS) avio_rb32(in); - if (flags & MOV_TRUN_SAMPLE_CTS) avio_rb32(in); + if (flags & MOV_TRUN_SAMPLE_SIZE) avio_rb32(in); + if (flags & MOV_TRUN_SAMPLE_FLAGS) avio_rb32(in); + if (flags & MOV_TRUN_SAMPLE_CTS) avio_rb32(in); if (sample_duration < 0) { - fprintf(stderr, "negative sample duration %d\n", sample_duration); + fprintf(stderr, "Negative sample duration %d\n", sample_duration); return -1; } ret += sample_duration; @@ -271,7 +271,8 @@ static int64_t read_moof_duration(AVIOContext *in, int64_t offset) avio_seek(in, offset, SEEK_SET); moof_size = avio_rb32(in); tag = avio_rb32(in); - if (expect_tag(tag, MKBETAG('m', 'o', 'o', 'f')) != 0) goto fail; + if (expect_tag(tag, MKBETAG('m', 'o', 'o', 'f')) != 0) + goto fail; while (pos < offset + moof_size) { pos = avio_tell(in); size = avio_rb32(in); @@ -288,12 +289,12 @@ static int64_t read_moof_duration(AVIOContext *in, int64_t offset) } avio_seek(in, pos + size, SEEK_SET); } - fprintf(stderr, "couldn't find trun"); + fprintf(stderr, "Couldn't find trun\n"); goto fail; } avio_seek(in, pos + size, SEEK_SET); } - fprintf(stderr, "couldn't find traf"); + fprintf(stderr, "Couldn't find traf\n"); fail: return ret; |