This is required for the files to play back properly in
windows media player.
---
 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);
-- 
1.7.3.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to