diff --git a/src/input/input_buffer.cpp b/src/input/input_buffer.cpp index 35a90849..4ccf7113 100644 --- a/src/input/input_buffer.cpp +++ b/src/input/input_buffer.cpp @@ -897,7 +897,7 @@ namespace Mist { } //if the new value is different, print a message and apply it if (cutTime != tmpNum) { - DEBUG_MSG(DLVL_DEVEL, "Setting cutTime from %u to new value of %lli", cutTime, tmpNum); + INFO_MSG("Setting cutTime from %u to new value of %lli", cutTime, tmpNum); cutTime = tmpNum; } @@ -931,9 +931,12 @@ namespace Mist { tmpNum = config->getOption("segmentsize").asInt(); } } + if (tmpNum < myMeta.biggestFragment()/2){ + tmpNum = myMeta.biggestFragment()/2; + } //if the new value is different, print a message and apply it if (segmentSize != tmpNum) { - DEBUG_MSG(DLVL_DEVEL, "Setting segmentSize from %u to new value of %lli", segmentSize, tmpNum); + INFO_MSG("Setting segmentSize from %u to new value of %lli", segmentSize, tmpNum); segmentSize = tmpNum; } /*LTS-END*/ diff --git a/src/input/input_dtsc.cpp b/src/input/input_dtsc.cpp index 236304d1..d53e1b1a 100644 --- a/src/input/input_dtsc.cpp +++ b/src/input/input_dtsc.cpp @@ -40,6 +40,21 @@ namespace Mist { capa["optional"]["DVR"]["option"] = "--buffer"; capa["optional"]["DVR"]["type"] = "uint"; capa["optional"]["DVR"]["default"] = 50000LL; + /*LTS-START*/ + option.null(); + option["arg"] = "integer"; + option["long"] = "segment-size"; + option["short"] = "S"; + option["help"] = "Target time duration in milliseconds for segments"; + option["value"].append(5000LL); + config->addOption("segmentsize", option); + capa["optional"]["segmentsize"]["name"] = "Segment size (ms)"; + capa["optional"]["segmentsize"]["help"] = "Target time duration in milliseconds for segments."; + capa["optional"]["segmentsize"]["option"] = "--segment-size"; + capa["optional"]["segmentsize"]["type"] = "uint"; + capa["optional"]["segmentsize"]["default"] = 5000LL; + /*LTS-END*/ + } bool inputDTSC::needsLock(){