diff --git a/src/output/output_progressive_mp4.cpp b/src/output/output_progressive_mp4.cpp index 80e91809..56300994 100644 --- a/src/output/output_progressive_mp4.cpp +++ b/src/output/output_progressive_mp4.cpp @@ -329,7 +329,9 @@ namespace Mist { header << std::string(moovBox.asBox(), moovBox.boxedSize()); char mdatHeader[8] = {0x00,0x00,0x00,0x00,'m','d','a','t'}; - Bit::htobl(mdatHeader, mdatSize); + if (mdatSize < 0xFFFFFFFF){ + Bit::htobl(mdatHeader, mdatSize); + } header.write(mdatHeader, 8); size += header.str().size();