You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	cmdutils: wrap exit explicitly
Some C runtime implementations deadlock when calling threading functions on the atexit() handler. Use a simpler wrapper similar to av_log to call the cleanup function before exit. Bug-Id: 523
This commit is contained in:
		
							
								
								
									
										10
									
								
								cmdutils.h
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								cmdutils.h
									
									
									
									
									
								
							| @@ -44,6 +44,16 @@ extern AVFormatContext *avformat_opts; | ||||
| extern struct SwsContext *sws_opts; | ||||
| extern AVDictionary *format_opts, *codec_opts, *resample_opts; | ||||
|  | ||||
| /** | ||||
|  * Register a program-specific cleanup routine. | ||||
|  */ | ||||
| void register_exit(void (*cb)(int ret)); | ||||
|  | ||||
| /** | ||||
|  * Wraps exit with a program-specific cleanup routine. | ||||
|  */ | ||||
| void exit_program(int ret); | ||||
|  | ||||
| /** | ||||
|  * Initialize the cmdutils option system, in particular | ||||
|  * allocate the *_opts contexts. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user