mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 12:14:46 -04:00
Disable audio future heads preparation
This commit is contained in:
parent
394fe4871f
commit
6806d1f242
@ -358,6 +358,12 @@ func (ts *Stream) GetSegment(segment int32) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ts *Stream) prerareNextSegements(segment int32) {
|
func (ts *Stream) prerareNextSegements(segment int32) {
|
||||||
|
// Audio is way cheaper to create than video so we don't need to run them in advance
|
||||||
|
// Running it in advance might actually slow down the video encode since less compute
|
||||||
|
// power can be used so we simply disable that.
|
||||||
|
if ts.handle.getFlags()&VideoF == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
ts.lock.RLock()
|
ts.lock.RLock()
|
||||||
defer ts.lock.RUnlock()
|
defer ts.lock.RUnlock()
|
||||||
for i := segment + 1; i <= min(segment+10, int32(len(ts.segments)-1)); i++ {
|
for i := segment + 1; i <= min(segment+10, int32(len(ts.segments)-1)); i++ {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user