mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Guard audio skip against old PTS values.
This commit is contained in:
parent
0f62a521f4
commit
6aa8601f7d
@ -2,6 +2,8 @@ User johns
|
||||
Date:
|
||||
|
||||
Release Version 0.5.1
|
||||
Guard audio skip against old PTS values.
|
||||
Improved audio skip, after channel switch.
|
||||
Setup add preview of collapsed tree.
|
||||
Fix bug: dvd plugin times out.
|
||||
Makes OSD size configurable.
|
||||
|
5
audio.c
5
audio.c
@ -3750,9 +3750,12 @@ void AudioVideoReady(int64_t pts)
|
||||
skip =
|
||||
pts - 15 * 20 * 90 - AudioBufferTime * 90 - audio_pts +
|
||||
VideoAudioDelay;
|
||||
#ifdef DEBUG
|
||||
printf("%dms %dms %dms\n", (int)(pts - audio_pts) / 90,
|
||||
VideoAudioDelay / 90, skip / 90);
|
||||
if (1 && skip > 0) {
|
||||
#endif
|
||||
// guard against old PTS
|
||||
if (skip> 0 && skip < 2000 * 90) {
|
||||
skip = (((int64_t) skip * AudioRing[AudioRingWrite].HwSampleRate)
|
||||
/ (1000 * 90))
|
||||
* AudioRing[AudioRingWrite].HwChannels * AudioBytesProSample;
|
||||
|
Loading…
Reference in New Issue
Block a user