mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-31 20:42:49 +08:00 
			
		
		
		
	avio: don't replicate avio_alloc_context functionality.
This commit is contained in:
		| @@ -838,19 +838,12 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) | |||||||
|     if (!buffer) |     if (!buffer) | ||||||
|         return AVERROR(ENOMEM); |         return AVERROR(ENOMEM); | ||||||
|  |  | ||||||
|     *s = av_mallocz(sizeof(AVIOContext)); |     *s = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, h, | ||||||
|     if(!*s) { |                             ffurl_read, ffurl_write, ffurl_seek); | ||||||
|  |     if (!*s) { | ||||||
|         av_free(buffer); |         av_free(buffer); | ||||||
|         return AVERROR(ENOMEM); |         return AVERROR(ENOMEM); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     if (ffio_init_context(*s, buffer, buffer_size, |  | ||||||
|                       h->flags & AVIO_FLAG_WRITE, h, |  | ||||||
|                       ffurl_read, ffurl_write, ffurl_seek) < 0) { |  | ||||||
|         av_free(buffer); |  | ||||||
|         av_freep(s); |  | ||||||
|         return AVERROR(EIO); |  | ||||||
|     } |  | ||||||
| #if FF_API_OLD_AVIO | #if FF_API_OLD_AVIO | ||||||
|     (*s)->is_streamed = h->is_streamed; |     (*s)->is_streamed = h->is_streamed; | ||||||
| #endif | #endif | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Anton Khirnov
					Anton Khirnov