Fixed various HLS problems with LQ/short inputs
This commit is contained in:
		
							parent
							
								
									ff049f4ea2
								
							
						
					
					
						commit
						260a0ceb68
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -20,6 +20,9 @@ namespace Mist { | |||
|     for (std::map<unsigned int,DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++){ | ||||
|       if (it->second.codec == "H264"){ | ||||
|         int bWidth = it->second.bps * 2; | ||||
|         if (bWidth < 5){ | ||||
|           bWidth = 5; | ||||
|         } | ||||
|         if (audioId != -1){ | ||||
|           bWidth += myMeta.tracks[audioId].bps * 2; | ||||
|         } | ||||
|  | @ -49,6 +52,9 @@ namespace Mist { | |||
|         longestFragment = it->getDuration(); | ||||
|       } | ||||
|     } | ||||
|     if ((myMeta.tracks[tid].lastms - myMeta.tracks[tid].firstms) / myMeta.tracks[tid].fragments.size() > longestFragment){ | ||||
|       longestFragment = (myMeta.tracks[tid].lastms - myMeta.tracks[tid].firstms) / myMeta.tracks[tid].fragments.size(); | ||||
|     } | ||||
|     result << "#EXTM3U\r\n#EXT-X-TARGETDURATION:" << (longestFragment / 1000) + 1 << "\r\n"; | ||||
|          | ||||
|     std::deque<std::string> lines; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma