avformat/hlsenc: Signal http end of chunk(http_shutdown) during hlsenc_io_close()
Currently http end of chunk is signalled implicitly in hlsenc_io_open(). This mean playlists http writes would have to wait upto a segment duration to signal end of chunk causing delays. This patch will fix that problem and improve performance.
This commit is contained in:
		
							parent
							
								
									6848201f70
								
							
						
					
					
						commit
						be2da4c522
					
				@ -269,8 +269,13 @@ static void hlsenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filename
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (!http_base_proto || !hls->http_persistent || hls->key_info_file || hls->encrypt) {
 | 
					    if (!http_base_proto || !hls->http_persistent || hls->key_info_file || hls->encrypt) {
 | 
				
			||||||
        ff_format_io_close(s, pb);
 | 
					        ff_format_io_close(s, pb);
 | 
				
			||||||
 | 
					#if CONFIG_HTTP_PROTOCOL
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
 | 
					        URLContext *http_url_context = ffio_geturlcontext(*pb);
 | 
				
			||||||
 | 
					        av_assert0(http_url_context);
 | 
				
			||||||
        avio_flush(*pb);
 | 
					        avio_flush(*pb);
 | 
				
			||||||
 | 
					        ffurl_shutdown(http_url_context, AVIO_FLAG_WRITE);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user