File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 22version : " 3"
33
44vars :
5- VERSION : " v1.5.1 "
5+ VERSION : " v1.6.0 "
66
77tasks :
88 clean :
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ func DurationToTicks(d time.Duration) uint64 {
9292
9393// TicksToDuration converts 90kHz ticks to a duration.
9494func TicksToDuration (ticks uint64 ) time.Duration {
95- return time .Duration (math .Round (( float64 (ticks ) / TicksPerNanosecond ) ))
95+ return time .Duration (math .Round (float64 (ticks ) / TicksPerNanosecond ))
9696}
9797
9898// BreakDuration specifies the duration of the commercial break(s). It may be
Original file line number Diff line number Diff line change @@ -145,6 +145,12 @@ func (sis *SpliceInfoSection) Decode(b []byte) (err error) {
145145}
146146
147147// DurationTicks attempts to return the duration of the signal in ticks.
148+ //
149+ // This method returns the splice insert's break_duration or the first valid
150+ // segmentation_duration found among the available splice descriptors.
151+ //
152+ // This method is not recommended for cases where segmentation_descriptors
153+ // contain conflicting segmentation_durations.
148154func (sis * SpliceInfoSection ) DurationTicks () uint64 {
149155 // if this is a splice insert with a duration, use it
150156 if sc , ok := sis .SpliceCommand .(* SpliceInsert ); ok {
@@ -165,6 +171,12 @@ func (sis *SpliceInfoSection) DurationTicks() uint64 {
165171}
166172
167173// Duration attempts to return the duration of the signal.
174+ //
175+ // This method returns the splice insert's break_duration or the first valid
176+ // segmentation_duration found among the available splice descriptors.
177+ //
178+ // This method is not recommended for cases where segmentation_descriptors
179+ // contain conflicting segmentation_durations.
168180func (sis * SpliceInfoSection ) Duration () time.Duration {
169181 return TicksToDuration (sis .DurationTicks ())
170182}
You can’t perform that action at this time.
0 commit comments