aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-02-17 14:40:24 +0200
committerMartin Storsjö <martin@martin.st>2012-02-18 00:03:32 +0200
commit53026339190132b79644bd2dec73ba9c9a902a4f (patch)
tree249f987f899c2bc4c81a0fc2b721d93b2f88f18e /libavformat
parent99a357f4c5091293bc42cb4bbd7bcae6a2624584 (diff)
downloadffmpeg-53026339190132b79644bd2dec73ba9c9a902a4f.tar.gz
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@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 58d3c56e0a..612bdcbbfd 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);