diff --git a/lib/dtsc.cpp b/lib/dtsc.cpp index f14c0516..952bba8d 100644 --- a/lib/dtsc.cpp +++ b/lib/dtsc.cpp @@ -287,9 +287,9 @@ void DTSC::Stream::addPacket(JSON::Value & newPack){ while (fragIt != metadata["tracks"][newTrack]["keys"].ArrEnd() && fragIt != metadata["tracks"][newTrack]["keys"].ArrEnd() - 1){ newFrag["len"] = newFrag["len"].asInt() + 1; newFrag["dur"] = newFrag["dur"].asInt() + (*fragIt)["len"].asInt(); - //more than 10 seconds? store the new fragment - if (newFrag["dur"].asInt() >= 10000 || (*fragIt)["len"].asInt() < 2){ - /// \todo Make this variable instead of hardcoded 10 seconds? + //more than 5 seconds? store the new fragment + if (newFrag["dur"].asInt() >= 5000 || (*fragIt)["len"].asInt() < 2){ + /// \todo Make this variable instead of hardcoded 5 seconds? metadata["tracks"][newTrack]["frags"].append(newFrag); break; }