mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Fix bug: audio use 100% CPU during pause.
This commit is contained in:
parent
73d65968ae
commit
d486fb2ca1
@ -2,6 +2,7 @@ User johns
|
|||||||
Date:
|
Date:
|
||||||
|
|
||||||
Release Version 0.5.1
|
Release Version 0.5.1
|
||||||
|
Fix bug: audio use 100% CPU during pause.
|
||||||
Guard audio skip against old PTS values.
|
Guard audio skip against old PTS values.
|
||||||
Improved audio skip, after channel switch.
|
Improved audio skip, after channel switch.
|
||||||
Setup add preview of collapsed tree.
|
Setup add preview of collapsed tree.
|
||||||
|
6
audio.c
6
audio.c
@ -3474,6 +3474,10 @@ static void *AudioPlayHandlerThread(void *dummy)
|
|||||||
AudioResetNormalizer();
|
AudioResetNormalizer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// FIXME: check AudioPaused ...Thread()
|
||||||
|
if (AudioPaused) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
} while (AudioRing[AudioRingRead].HwSampleRate);
|
} while (AudioRing[AudioRingRead].HwSampleRate);
|
||||||
}
|
}
|
||||||
return dummy;
|
return dummy;
|
||||||
@ -3755,7 +3759,7 @@ void AudioVideoReady(int64_t pts)
|
|||||||
VideoAudioDelay / 90, skip / 90);
|
VideoAudioDelay / 90, skip / 90);
|
||||||
#endif
|
#endif
|
||||||
// guard against old PTS
|
// guard against old PTS
|
||||||
if (skip> 0 && skip < 2000 * 90) {
|
if (skip > 0 && skip < 2000 * 90) {
|
||||||
skip = (((int64_t) skip * AudioRing[AudioRingWrite].HwSampleRate)
|
skip = (((int64_t) skip * AudioRing[AudioRingWrite].HwSampleRate)
|
||||||
/ (1000 * 90))
|
/ (1000 * 90))
|
||||||
* AudioRing[AudioRingWrite].HwChannels * AudioBytesProSample;
|
* AudioRing[AudioRingWrite].HwChannels * AudioBytesProSample;
|
||||||
|
Loading…
Reference in New Issue
Block a user