mirror of
				https://github.com/ossrs/srs.git
				synced 2025-03-09 15:49:59 +00:00 
			
		
		
		
	Live: Refine log for monotonically increase.
This commit is contained in:
		
							parent
							
								
									e690c93bcf
								
							
						
					
					
						commit
						6caca900b3
					
				
					 1 changed files with 7 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -2233,11 +2233,12 @@ srs_error_t SrsLiveSource::on_audio(SrsCommonMessage* shared_audio)
 | 
			
		|||
{
 | 
			
		||||
    srs_error_t err = srs_success;
 | 
			
		||||
    
 | 
			
		||||
    // monotically increase detect.
 | 
			
		||||
    // Detect where stream is monotonically increasing.
 | 
			
		||||
    if (!mix_correct && is_monotonically_increase) {
 | 
			
		||||
        if (last_packet_time > 0 && shared_audio->header.timestamp < last_packet_time) {
 | 
			
		||||
            is_monotonically_increase = false;
 | 
			
		||||
            srs_warn("AUDIO: stream not monotonically increase, please open mix_correct.");
 | 
			
		||||
            srs_warn("AUDIO: Timestamp %" PRId64 "=>%" PRId64 ", may need mix_correct.",
 | 
			
		||||
                last_packet_time, shared_audio->header.timestamp);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    last_packet_time = shared_audio->header.timestamp;
 | 
			
		||||
| 
						 | 
				
			
			@ -2354,12 +2355,13 @@ srs_error_t SrsLiveSource::on_audio_imp(SrsSharedPtrMessage* msg)
 | 
			
		|||
srs_error_t SrsLiveSource::on_video(SrsCommonMessage* shared_video)
 | 
			
		||||
{
 | 
			
		||||
    srs_error_t err = srs_success;
 | 
			
		||||
    
 | 
			
		||||
    // monotically increase detect.
 | 
			
		||||
 | 
			
		||||
    // Detect where stream is monotonically increasing.
 | 
			
		||||
    if (!mix_correct && is_monotonically_increase) {
 | 
			
		||||
        if (last_packet_time > 0 && shared_video->header.timestamp < last_packet_time) {
 | 
			
		||||
            is_monotonically_increase = false;
 | 
			
		||||
            srs_warn("VIDEO: stream not monotonically increase, please open mix_correct.");
 | 
			
		||||
            srs_warn("VIDEO: Timestamp %" PRId64 "=>%" PRId64 ", may need mix_correct.",
 | 
			
		||||
                last_packet_time, shared_video->header.timestamp);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    last_packet_time = shared_video->header.timestamp;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue