summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-03 04:01:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-03 04:01:34 +0100
commitb0ba8a23b61506766f8497e2bf972da2077d235a (patch)
treecbef29880a6c5c90c91f1a7c55a669b67cbfcb9a /libavformat/movenc.c
parentf38e2bcb72ee2df60ce0fbeb2e33ce0ca8ebd7e8 (diff)
parentb3b0b35db2f3b61bf2f0f4fa85f5b6267d83c8fe (diff)
Merge commit 'b3b0b35db2f3b61bf2f0f4fa85f5b6267d83c8fe'
* commit 'b3b0b35db2f3b61bf2f0f4fa85f5b6267d83c8fe': movenc: Get rid of a hack for updating the dvc1 atom Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 67d81ab618..48e1445780 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -721,9 +721,11 @@ static int mov_write_dvc1_structs(MOVTrack *track, uint8_t *buf)
if (track->start_dts == AV_NOPTS_VALUE) {
/* No packets written yet, vc1_info isn't authoritative yet. */
- /* Assume inline sequence and entry headers. This will be
- * overwritten at the end if the file is seekable. */
+ /* Assume inline sequence and entry headers. */
packet_seq = packet_entry = 1;
+ av_log(NULL, AV_LOG_WARNING,
+ "moov atom written before any packets, unable to write correct "
+ "dvc1 atom. Set the delay_moov flag to fix this.\n");
}
unescaped = av_mallocz(track->vos_len + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -799,7 +801,6 @@ static int mov_write_dvc1_tag(AVIOContext *pb, MOVTrack *track)
avio_wb32(pb, track->vos_len + 8 + sizeof(buf));
ffio_wfourcc(pb, "dvc1");
- track->vc1_info.struct_offset = avio_tell(pb);
avio_write(pb, buf, sizeof(buf));
avio_write(pb, track->vos_data, track->vos_len);
@@ -5167,19 +5168,6 @@ static int mov_write_trailer(AVFormatContext *s)
}
}
- for (i = 0; i < mov->nb_streams; i++) {
- if (mov->flags & FF_MOV_FLAG_FRAGMENT &&
- mov->tracks[i].vc1_info.struct_offset && s->pb->seekable) {
- int64_t off = avio_tell(pb);
- uint8_t buf[7];
- if (mov_write_dvc1_structs(&mov->tracks[i], buf) >= 0) {
- avio_seek(pb, mov->tracks[i].vc1_info.struct_offset, SEEK_SET);
- avio_write(pb, buf, 7);
- avio_seek(pb, off, SEEK_SET);
- }
- }
- }
-
error:
mov_free(s);