[FFmpeg-cvslog] movenc: Write the unknown duration as 64 bit fields in ismv
Martin Storsjö
git at videolan.org
Sun Feb 19 02:19:06 CET 2012
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Feb 17 14:40:24 2012 +0200| [53026339190132b79644bd2dec73ba9c9a902a4f] | committer: Martin Storsjö
movenc: Write the unknown duration as 64 bit fields in ismv
This is required for the files to play back properly in
windows media player.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=53026339190132b79644bd2dec73ba9c9a902a4f
---
libavformat/movenc.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 58d3c56..612bdcb 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1305,6 +1305,9 @@ static int mov_write_mdhd_tag(AVIOContext *pb, MOVTrack *track)
{
int version = track->track_duration < INT32_MAX ? 0 : 1;
+ if (track->mode == MODE_ISM)
+ version = 1;
+
(version == 1) ? avio_wb32(pb, 44) : avio_wb32(pb, 32); /* size */
ffio_wfourcc(pb, "mdhd");
avio_w8(pb, version);
@@ -1351,6 +1354,9 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVTrack *track, AVStream *st)
track->timescale, AV_ROUND_UP);
int version = duration < INT32_MAX ? 0 : 1;
+ if (track->mode == MODE_ISM)
+ version = 1;
+
(version == 1) ? avio_wb32(pb, 104) : avio_wb32(pb, 92); /* size */
ffio_wfourcc(pb, "tkhd");
avio_w8(pb, version);
More information about the ffmpeg-cvslog
mailing list