From 2889c5e16711770437f380f1bead5f72c6a0b17a Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Fri, 6 Mar 2015 15:45:50 +0200 Subject: movenc: Heuristically set the duration of the last sample in a fragment if not set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Even if this is a guess, it is way better than writing a zero duration of the last sample in a fragment (because if the duration is zero, the first sample of the next fragment will have the same timestamp as the last sample in the previous one). Since we normally don't require libavformat muxer users to set the duration field in AVPacket, we probably can't strictly require it here either, so don't log this as a strict warning, only as info. Signed-off-by: Martin Storsjö --- libavformat/movenc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libavformat/movenc.h') diff --git a/libavformat/movenc.h b/libavformat/movenc.h index eb059d915f..a1d49024bd 100644 --- a/libavformat/movenc.h +++ b/libavformat/movenc.h @@ -174,6 +174,7 @@ typedef struct MOVMuxContext { int use_editlist; int frag_interleave; + int missing_duration_warned; } MOVMuxContext; #define FF_MOV_FLAG_RTP_HINT (1 << 0) -- cgit v1.2.3