diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-08-10 11:23:21 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-08-10 11:23:21 +0200 |
commit | 7653ebfff6ea3f91ea81599ba8e2af922c510ecb (patch) | |
tree | 9f3e055049800aa8e1b053b61083e66937a0a6e8 /libavformat/movenc.c | |
parent | 6c52432b4812acd68c2b93cdc367828cb73b68a4 (diff) | |
parent | 83f254e65f938657a4dbec711e4c94252a72daf9 (diff) | |
download | ffmpeg-7653ebfff6ea3f91ea81599ba8e2af922c510ecb.tar.gz |
Merge commit '83f254e65f938657a4dbec711e4c94252a72daf9'
* commit '83f254e65f938657a4dbec711e4c94252a72daf9':
movenc: Rename reserved_moov_pos to reserved_header_pos
Conflicts:
libavformat/movenc.c
libavformat/movenc.h
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index d04ac6b4b4..25d4c5fbce 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4168,7 +4168,7 @@ static int mov_flush_fragment(AVFormatContext *s) if (mov->flags & FF_MOV_FLAG_DELAY_MOOV) { if (mov->flags & FF_MOV_FLAG_FASTSTART) - mov->reserved_moov_pos = avio_tell(s->pb); + mov->reserved_header_pos = avio_tell(s->pb); avio_flush(s->pb); mov->moov_written = 1; return 0; @@ -5229,7 +5229,7 @@ static int mov_write_header(AVFormatContext *s) if (mov->reserved_moov_size){ - mov->reserved_moov_pos= avio_tell(pb); + mov->reserved_header_pos = avio_tell(pb); if (mov->reserved_moov_size > 0) avio_skip(pb, mov->reserved_moov_size); } @@ -5242,7 +5242,7 @@ static int mov_write_header(AVFormatContext *s) mov->flags |= FF_MOV_FLAG_FRAG_KEYFRAME; } else { if (mov->flags & FF_MOV_FLAG_FASTSTART) - mov->reserved_moov_pos = avio_tell(pb); + mov->reserved_header_pos = avio_tell(pb); mov_write_mdat_tag(pb, mov); } @@ -5302,7 +5302,7 @@ static int mov_write_header(AVFormatContext *s) return ret; mov->moov_written = 1; if (mov->flags & FF_MOV_FLAG_FASTSTART) - mov->reserved_moov_pos = avio_tell(pb); + mov->reserved_header_pos = avio_tell(pb); } return 0; @@ -5419,10 +5419,10 @@ static int shift_data(AVFormatContext *s) /* mark the end of the shift to up to the last data we wrote, and get ready * for writing */ pos_end = avio_tell(s->pb); - avio_seek(s->pb, mov->reserved_moov_pos + moov_size, SEEK_SET); + avio_seek(s->pb, mov->reserved_header_pos + moov_size, SEEK_SET); /* start reading at where the new moov will be placed */ - avio_seek(read_pb, mov->reserved_moov_pos, SEEK_SET); + avio_seek(read_pb, mov->reserved_header_pos, SEEK_SET); pos = avio_tell(read_pb); #define READ_BLOCK do { \ @@ -5496,13 +5496,13 @@ static int mov_write_trailer(AVFormatContext *s) ffio_wfourcc(pb, "mdat"); avio_wb64(pb, mov->mdat_size + 16); } - avio_seek(pb, mov->reserved_moov_size > 0 ? mov->reserved_moov_pos : moov_pos, SEEK_SET); + avio_seek(pb, mov->reserved_moov_size > 0 ? mov->reserved_header_pos : moov_pos, SEEK_SET); if (mov->flags & FF_MOV_FLAG_FASTSTART) { av_log(s, AV_LOG_INFO, "Starting second pass: moving the moov atom to the beginning of the file\n"); res = shift_data(s); if (res == 0) { - avio_seek(pb, mov->reserved_moov_pos, SEEK_SET); + avio_seek(pb, mov->reserved_header_pos, SEEK_SET); if ((res = mov_write_moov_tag(pb, mov, s)) < 0) goto error; } @@ -5510,7 +5510,7 @@ static int mov_write_trailer(AVFormatContext *s) int64_t size; if ((res = mov_write_moov_tag(pb, mov, s)) < 0) goto error; - size = mov->reserved_moov_size - (avio_tell(pb) - mov->reserved_moov_pos); + size = mov->reserved_moov_size - (avio_tell(pb) - mov->reserved_header_pos); if (size < 8){ av_log(s, AV_LOG_ERROR, "reserved_moov_size is too small, needed %"PRId64" additional\n", 8-size); res = AVERROR(EINVAL); @@ -5534,7 +5534,7 @@ static int mov_write_trailer(AVFormatContext *s) res = shift_data(s); if (res == 0) { int64_t end = avio_tell(pb); - avio_seek(pb, mov->reserved_moov_pos, SEEK_SET); + avio_seek(pb, mov->reserved_header_pos, SEEK_SET); mov_write_sidx_tags(pb, mov, -1, 0); avio_seek(pb, end, SEEK_SET); mov_write_mfra_tag(pb, mov); |