Commit 53026339 authored by Martin Storsjö's avatar 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: 's avatarMartin Storsjö <martin@martin.st>
parent 99a357f4
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment