mirror of
				https://github.com/devine-dl/devine.git
				synced 2025-11-04 03:44:49 +00:00 
			
		
		
		
	HLS: Don't merge on discontinuity, if it's the first segment
How the m3u8 parser handles/groups #EXT-X to segment objects means the #EXT-X-DISCONTINUITY (`discontinuity` property) is tied to whatever segment is below it's line. Therefore, there's never a scenario where we need to merge+decrypt and the first every segment of the for loop, as there's no segments before it. This can happen from just slightly off-spec playlists (can't blame it) but also from the OnSegmentFilter filtering out all segments before the first EXT-X-DISCONTINUITY. Common to happen when filtering out bumpers/intros.
This commit is contained in:
		
							parent
							
								
									eac5ed5b61
								
							
						
					
					
						commit
						6a37fe9d1b
					
				@ -382,7 +382,7 @@ class HLS:
 | 
			
		||||
                        encode("utf8")
 | 
			
		||||
                segment_file_path.write_bytes(segment_data)
 | 
			
		||||
 | 
			
		||||
            if segment.discontinuity:
 | 
			
		||||
            if segment.discontinuity and i != 0:
 | 
			
		||||
                if encryption_data:
 | 
			
		||||
                    decrypt(include_this_segment=False)
 | 
			
		||||
                merge_discontinuity()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user