mirror of
				https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
				synced 2023-10-10 17:16:51 +00:00 
			
		
		
		
	Fix bug: audio increments invalid audio PTS.
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
			
		||||
User johns
 | 
			
		||||
 | 
			
		||||
    Fix bug: audio increments invalid audio PTS.
 | 
			
		||||
    Fix bug: dvd plugin not working.
 | 
			
		||||
    Fix bug: used frame-> instead of video_ctx-> for old libav/ffmpeg.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								audio.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								audio.c
									
									
									
									
									
								
							@@ -290,9 +290,11 @@ static int AlsaAddToRingbuffer(const void *samples, int count)
 | 
			
		||||
	// FIXME: should skip more, longer skip, but less often?
 | 
			
		||||
    }
 | 
			
		||||
    // Update audio clock
 | 
			
		||||
    AudioPTS +=
 | 
			
		||||
	((int64_t) count * 90000) / (AudioSampleRate * AudioChannels *
 | 
			
		||||
	AudioBytesProSample);
 | 
			
		||||
    if (AudioPTS != INT64_C(0x8000000000000000)) {
 | 
			
		||||
	AudioPTS +=
 | 
			
		||||
	    ((int64_t) count * 90000) / (AudioSampleRate * AudioChannels *
 | 
			
		||||
	    AudioBytesProSample);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!AudioRunning) {
 | 
			
		||||
	if (AlsaStartThreshold < RingBufferUsedBytes(AlsaRingBuffer)) {
 | 
			
		||||
@@ -1275,9 +1277,11 @@ static int OssAddToRingbuffer(const void *samples, int count)
 | 
			
		||||
	// FIXME: should skip more, longer skip, but less often?
 | 
			
		||||
    }
 | 
			
		||||
    // Update audio clock
 | 
			
		||||
    AudioPTS +=
 | 
			
		||||
	((int64_t) count * 90000) / (AudioSampleRate * AudioChannels *
 | 
			
		||||
	AudioBytesProSample);
 | 
			
		||||
    if (AudioPTS != INT64_C(0x8000000000000000)) {
 | 
			
		||||
	AudioPTS +=
 | 
			
		||||
	    ((int64_t) count * 90000) / (AudioSampleRate * AudioChannels *
 | 
			
		||||
	    AudioBytesProSample);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!AudioRunning) {
 | 
			
		||||
	if (OssStartThreshold < RingBufferUsedBytes(OssRingBuffer)) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user