aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-10-12 00:33:24 +0300
committerMartin Storsjö <martin@martin.st>2014-10-12 17:46:56 +0300
commitdad12ce452a9d69c0d9d53c375003947d5f1b02e (patch)
tree1f8533730066bb5847761645cc5788801e88f84a /libavformat/movenc.c
parentdbb472cb2f2f799295a12b4922a6a8be2cccfdee (diff)
downloadffmpeg-dad12ce452a9d69c0d9d53c375003947d5f1b02e.tar.gz
movenc: Print a warning for an unhandled case of nonzero start dts with empty_moov
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index be11cfa444..66e3c03012 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3115,8 +3115,14 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
* of this packet to be what the previous packets duration implies. */
trk->cluster[trk->entry].dts = trk->start_dts + trk->track_duration;
}
- if (trk->start_dts == AV_NOPTS_VALUE)
+ if (trk->start_dts == AV_NOPTS_VALUE) {
trk->start_dts = pkt->dts;
+ if (pkt->dts && mov->flags & FF_MOV_FLAG_EMPTY_MOOV)
+ av_log(s, AV_LOG_WARNING,
+ "Track %d starts with a nonzero dts %"PRId64". This "
+ "currently isn't handled correctly in combination with "
+ "empty_moov.\n", pkt->stream_index, pkt->dts);
+ }
trk->track_duration = pkt->dts - trk->start_dts + pkt->duration;
if (pkt->pts == AV_NOPTS_VALUE) {