[FFmpeg-cvslog] movenc: Avoid writing separate flags for the first sample if not necessary
Martin Storsjö
git at videolan.org
Mon Mar 9 11:36:08 CET 2015
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Mar 6 11:26:40 2015 +0200| [46d4d8575979a24a8d026d9805039b724e0e3e5f] | committer: Martin Storsjö
movenc: Avoid writing separate flags for the first sample if not necessary
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46d4d8575979a24a8d026d9805039b724e0e3e5f
---
libavformat/movenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 122bc2d..67c7214 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2490,7 +2490,8 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
if (i > 0 && get_sample_flags(track, &track->cluster[i]) != track->default_sample_flags)
flags |= MOV_TRUN_SAMPLE_FLAGS;
}
- if (!(flags & MOV_TRUN_SAMPLE_FLAGS))
+ if (!(flags & MOV_TRUN_SAMPLE_FLAGS) && track->entry > 0 &&
+ get_sample_flags(track, &track->cluster[0]) != track->default_sample_flags)
flags |= MOV_TRUN_FIRST_SAMPLE_FLAGS;
if (track->flags & MOV_TRACK_CTTS)
flags |= MOV_TRUN_SAMPLE_CTS;
More information about the ffmpeg-cvslog
mailing list