Commit 8613c4a 1 parent 3ef1414 commit 8613c4a Copy full SHA for 8613c4a
File tree 3 files changed +14
-2
lines changed
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 2
2
version : " 3"
3
3
4
4
vars :
5
- VERSION : " v1.5.1 "
5
+ VERSION : " v1.6.0 "
6
6
7
7
tasks :
8
8
clean :
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ func DurationToTicks(d time.Duration) uint64 {
92
92
93
93
// TicksToDuration converts 90kHz ticks to a duration.
94
94
func TicksToDuration (ticks uint64 ) time.Duration {
95
- return time .Duration (math .Round (( float64 (ticks ) / TicksPerNanosecond ) ))
95
+ return time .Duration (math .Round (float64 (ticks ) / TicksPerNanosecond ))
96
96
}
97
97
98
98
// 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) {
145
145
}
146
146
147
147
// 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.
148
154
func (sis * SpliceInfoSection ) DurationTicks () uint64 {
149
155
// if this is a splice insert with a duration, use it
150
156
if sc , ok := sis .SpliceCommand .(* SpliceInsert ); ok {
@@ -165,6 +171,12 @@ func (sis *SpliceInfoSection) DurationTicks() uint64 {
165
171
}
166
172
167
173
// 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.
168
180
func (sis * SpliceInfoSection ) Duration () time.Duration {
169
181
return TicksToDuration (sis .DurationTicks ())
170
182
}
You can’t perform that action at this time.
0 commit comments