mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-11-01 04:53:04 +08:00 
			
		
		
		
	avformat/aviobuf: Honor avio_open[2] documentation
The documentation of both avio_open() as well as avio_open2() states that on failure, the pointer to an AVIOContext given to this function (via a pointer to a pointer to an AVIOContext) will be set to NULL. Yet it didn't happen upon failure of ffurl_open_whitelist() or when allocating the internal buffer failed. This commit changes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		 Andreas Rheinhardt
					Andreas Rheinhardt
				
			
				
					committed by
					
						 Michael Niedermayer
						Michael Niedermayer
					
				
			
			
				
	
			
			
			 Michael Niedermayer
						Michael Niedermayer
					
				
			
						parent
						
							10f0332fd5
						
					
				
				
					commit
					220846f74f
				
			| @@ -1197,6 +1197,8 @@ int ffio_open_whitelist(AVIOContext **s, const char *filename, int flags, | |||||||
|     URLContext *h; |     URLContext *h; | ||||||
|     int err; |     int err; | ||||||
|  |  | ||||||
|  |     *s = NULL; | ||||||
|  |  | ||||||
|     err = ffurl_open_whitelist(&h, filename, flags, int_cb, options, whitelist, blacklist, NULL); |     err = ffurl_open_whitelist(&h, filename, flags, int_cb, options, whitelist, blacklist, NULL); | ||||||
|     if (err < 0) |     if (err < 0) | ||||||
|         return err; |         return err; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user