Updates for buffer stream resetting.
This commit is contained in:
		
							parent
							
								
									a906da6caf
								
							
						
					
					
						commit
						6666cf22f0
					
				
					 1 changed files with 9 additions and 1 deletions
				
			
		
							
								
								
									
										10
									
								
								lib/dtsc.cpp
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								lib/dtsc.cpp
									
										
									
									
									
								
							|  | @ -195,7 +195,15 @@ void DTSC::Stream::addPacket(JSON::Value & newPack){ | |||
|   if (buffers.size() > 0){ | ||||
|     livePos lastPos = buffers.rbegin()->first; | ||||
|     if (newPos < lastPos){ | ||||
|       newPos.seekTime = lastPos.seekTime+1; | ||||
|       if (newPos.seekTime < lastPos.seekTime - 1000){ | ||||
|         metadata.null(); | ||||
|         metadata["reset"] = 1LL; | ||||
|         buffers.clear; | ||||
|         keyframes.clear(); | ||||
|         trackMapping.clear(); | ||||
|       }else{ | ||||
|         newPos.seekTime = lastPos.seekTime+1; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   std::string newTrack = trackMapping[newPos.trackID]; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Erik Zandvliet
						Erik Zandvliet